Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
0371-Make-domain-name-comparison-ignore-trailin...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0371-Make-domain-name-comparison-ignore-trailing-dot.patch of Package erlang
From b42660f73f080027e333e49393a8405b838e1126 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen <raimo@erlang.org> Date: Wed, 18 May 2022 18:03:08 +0200 Subject: [PATCH] Make domain name comparison ignore trailing dot --- lib/kernel/src/inet_db.erl | 4 ++++ lib/kernel/test/inet_res_SUITE.erl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/kernel/src/inet_db.erl b/lib/kernel/src/inet_db.erl index 87b272a44b..408f563909 100644 --- a/lib/kernel/src/inet_db.erl +++ b/lib/kernel/src/inet_db.erl @@ -1848,6 +1848,10 @@ eq_domains([A | As], [B | Bs]) -> false end end; +eq_domains([$.], []) -> + true; +eq_domains([], [$.]) -> + true; eq_domains([], []) -> true; eq_domains(As, Bs) when is_list(As), is_list(Bs) -> diff --git a/lib/kernel/test/inet_res_SUITE.erl b/lib/kernel/test/inet_res_SUITE.erl index 60589c33dc..da079fea1b 100644 --- a/lib/kernel/test/inet_res_SUITE.erl +++ b/lib/kernel/test/inet_res_SUITE.erl @@ -514,6 +514,7 @@ basic(Config) when is_list(Config) -> NS = ns(Config), Name = "ns.otptest", NameC = caseflip(Name), + NameD = NameC ++ ".", IP1 = {127,0,0,253}, IP2 = {127,0,0,254}, %% @@ -575,6 +576,9 @@ basic(Config) when is_list(Config) -> [IP1, IP2] = lists:sort( inet_res:lookup(NameC, in, a, [{nameservers,[NS]},verbose])), + [IP1, IP2] = + lists:sort( + inet_res:lookup(NameD, in, a, [{nameservers,[NS]},verbose])), %% %% gethostbyname ?P("gethostbyname"), -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor