Fix EPMD port assignment in IPv6 environment
See this PR for the details: * https://github.com/erlang/otp/pull/erlang/otp/pull/1487 Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This commit is contained in:
parent
3484e6a9b9
commit
fc59c2ce6e
@ -66,7 +66,7 @@
|
||||
|
||||
Name: erlang
|
||||
Version: 19.3.6
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: General-purpose programming language and runtime environment
|
||||
|
||||
Group: Development/Languages
|
||||
@ -119,6 +119,9 @@ Patch6: otp-0006-Do-not-install-erlang-sources.patch
|
||||
# Fedora specific patch
|
||||
# Fix CVE-2016-10253
|
||||
Patch7: otp-0007-Fix-CVE-2016-10253.patch
|
||||
# Fedora specific patch
|
||||
# Fix erl_epmd:port_please when using IPv6
|
||||
Patch8: otp-0008-Fix-erl_epmd-port_please-when-using-IPv6.patch
|
||||
# end of autogenerated patch tag list
|
||||
|
||||
BuildRequires: flex
|
||||
@ -932,6 +935,7 @@ Provides support for XML 1.0.
|
||||
%patch5 -p1 -b .Do_not_install_nteventlog_and_related_doc_files_on_n
|
||||
%patch6 -p1 -b .Do_not_install_erlang_sources
|
||||
%patch7 -p1 -b .Fix_CVE_2016_10253
|
||||
%patch8 -p1 -b .Fix_erl_epmd_port_please_when_using_IPv6
|
||||
# end of autogenerated prep patch list
|
||||
|
||||
# FIXME we should come up with a better solution
|
||||
@ -2322,6 +2326,9 @@ useradd -r -g epmd -d /dev/null -s /sbin/nologin \
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jun 16 2017 Peter Lemenkov <lemenkov@gmail.com> - 19.3.6-2
|
||||
- Fix EPMD port assignment in IPv6 env. (GH#1487)
|
||||
|
||||
* Tue Jun 13 2017 Peter Lemenkov <lemenkov@gmail.com> - 19.3.6-1
|
||||
- Ver. 19.3.6
|
||||
|
||||
|
26
otp-0008-Fix-erl_epmd-port_please-when-using-IPv6.patch
Normal file
26
otp-0008-Fix-erl_epmd-port_please-when-using-IPv6.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From: John Eckersberg <jeckersb@redhat.com>
|
||||
Date: Wed, 14 Jun 2017 12:32:17 -0400
|
||||
Subject: [PATCH] Fix erl_epmd:port_please when using IPv6
|
||||
|
||||
This mirrors the behavior of inet:gethostbyname when no family or
|
||||
timeout is supplied.
|
||||
|
||||
diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl
|
||||
index 7bc9e2ede3..f96bc88913 100644
|
||||
--- a/lib/kernel/src/erl_epmd.erl
|
||||
+++ b/lib/kernel/src/erl_epmd.erl
|
||||
@@ -79,7 +79,13 @@ port_please(Node, EpmdAddr, Timeout) ->
|
||||
|
||||
|
||||
port_please1(Node,HostName, Timeout) ->
|
||||
- case inet:gethostbyname(HostName, inet, Timeout) of
|
||||
+ Family = case inet_db:res_option(inet6) of
|
||||
+ true ->
|
||||
+ inet6;
|
||||
+ false ->
|
||||
+ inet
|
||||
+ end,
|
||||
+ case inet:gethostbyname(HostName, Family, Timeout) of
|
||||
{ok,{hostent, _Name, _ , _Af, _Size, [EpmdAddr | _]}} ->
|
||||
get_port(Node, EpmdAddr, Timeout);
|
||||
Else ->
|
Loading…
Reference in New Issue
Block a user