diff options
author | Micael Karlberg <[email protected]> | 2011-12-16 10:02:01 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-12-20 17:09:49 +0100 |
commit | c1fe4ce53f2df2c10078de2abae712d49fd6a633 (patch) | |
tree | 1bb81b3c405fa5d5631a1c6380889a0f5025d39d /lib | |
parent | 021d5c2e49e623d4f43c0cc88a097bc99f3564e6 (diff) | |
download | otp-c1fe4ce53f2df2c10078de2abae712d49fd6a633.tar.gz otp-c1fe4ce53f2df2c10078de2abae712d49fd6a633.tar.bz2 otp-c1fe4ce53f2df2c10078de2abae712d49fd6a633.zip |
[ftp] Fails to open IPv6 connection
Fails to open IPv6 connection due to badly formatted IPv6 address in
EPRT command. The address part of the command incorrectly contained decimal
elements instead of hexadecimal.
Attila Rajmund Nohl
OTP-9827
Diffstat (limited to 'lib')
-rw-r--r-- | lib/inets/doc/src/notes.xml | 36 | ||||
-rw-r--r-- | lib/inets/src/ftp/ftp.erl | 7 | ||||
-rw-r--r-- | lib/inets/src/inets_app/inets.appup.src | 18 | ||||
-rw-r--r-- | lib/inets/vsn.mk | 2 |
4 files changed, 56 insertions, 7 deletions
diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml index de934b91ea..ae2557b44e 100644 --- a/lib/inets/doc/src/notes.xml +++ b/lib/inets/doc/src/notes.xml @@ -32,6 +32,42 @@ <file>notes.xml</file> </header> + <section><title>Inets 5.7.3</title> + <section><title>Improvements and New Features</title> + <p>-</p> + +<!-- + <list> + <item> + <p>[httpc|httpd] Added support for IPv6 with ssl. </p> + <p>Own Id: OTP-5566</p> + </item> + + </list> +--> + + </section> + + <section><title>Fixed Bugs and Malfunctions</title> +<!-- + <p>-</p> +--> + + <list> + <item> + <p>[ftp] Fails to open IPv6 connection due to badly formatted + IPv6 address in EPRT command. The address part of the command + incorrectly contained decimal elements instead of hexadecimal. </p> + <p>Own Id: OTP-9827</p> + <p>Aux Id: Seq 11970 </p> + </item> + + </list> + </section> + + </section> <!-- 5.7.3 --> + + <section><title>Inets 5.7.2</title> <section><title>Improvements and New Features</title> <p>-</p> diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl index ac72963347..3028cd800f 100644 --- a/lib/inets/src/ftp/ftp.erl +++ b/lib/inets/src/ftp/ftp.erl @@ -1912,17 +1912,14 @@ setup_ctrl_connection(Host, Port, Timeout, State) -> setup_data_connection(#state{mode = active, caller = Caller, csock = CSock} = State) -> - IntToString = fun(Element) -> integer_to_list(Element) end, - case (catch inet:sockname(CSock)) of {ok, {{_, _, _, _, _, _, _, _} = IP, _}} -> {ok, LSock} = gen_tcp:listen(0, [{ip, IP}, {active, false}, inet6, binary, {packet, 0}]), {ok, Port} = inet:port(LSock), - Cmd = mk_cmd("EPRT |2|~s:~s:~s:~s:~s:~s:~s:~s|~s|", - lists:map(IntToString, - tuple_to_list(IP) ++ [Port])), + IpAddress = inet_parse:ntoa(IP), + Cmd = mk_cmd("EPRT |2|~s|~p|", [IpAddress, Port]), send_ctrl_message(State, Cmd), activate_ctrl_connection(State), {noreply, State#state{caller = {setup_data_connection, diff --git a/lib/inets/src/inets_app/inets.appup.src b/lib/inets/src/inets_app/inets.appup.src index fb605351b4..a9ffd89568 100644 --- a/lib/inets/src/inets_app/inets.appup.src +++ b/lib/inets/src/inets_app/inets.appup.src @@ -18,8 +18,14 @@ {"%VSN%", [ + {"5.7.2", + [ + {load_module, ftp, soft_purge, soft_purge, []} + ] + }, {"5.7.1", [ + {load_module, ftp, soft_purge, soft_purge, []}, {load_module, http_uri, soft_purge, soft_purge, []}, {load_module, http_util, soft_purge, soft_purge, []}, {load_module, httpd_util, soft_purge, soft_purge, [http_util]}, @@ -31,6 +37,7 @@ }, {"5.7", [ + {load_module, ftp, soft_purge, soft_purge, []}, {load_module, http_uri, soft_purge, soft_purge, []}, {load_module, httpd_util, soft_purge, soft_purge, [http_util]}, {load_module, httpd_file, soft_purge, soft_purge, []}, @@ -43,6 +50,7 @@ }, {"5.6", [ + {load_module, ftp, soft_purge, soft_purge, []}, {load_module, http_uri, soft_purge, soft_purge, []}, {load_module, httpd_util, soft_purge, soft_purge, [http_util]}, {load_module, httpd_file, soft_purge, soft_purge, []}, @@ -80,8 +88,14 @@ } ], [ + {"5.7.2", + [ + {load_module, ftp, soft_purge, soft_purge, []} + ] + }, {"5.7.1", [ + {load_module, ftp, soft_purge, soft_purge, []}, {load_module, http_uri, soft_purge, soft_purge, []}, {load_module, http_util, soft_purge, soft_purge, []}, {load_module, httpd_util, soft_purge, soft_purge, [http_util]}, @@ -92,7 +106,8 @@ ] }, {"5.7", - [ + [ + {load_module, ftp, soft_purge, soft_purge, []}, {load_module, http_uri, soft_purge, soft_purge, []}, {load_module, httpd_util, soft_purge, soft_purge, [http_util]}, {load_module, httpd_file, soft_purge, soft_purge, []}, @@ -105,6 +120,7 @@ }, {"5.6", [ + {load_module, ftp, soft_purge, soft_purge, []}, {load_module, http_uri, soft_purge, soft_purge, []}, {load_module, httpd_util, soft_purge, soft_purge, [http_util]}, {load_module, httpd_file, soft_purge, soft_purge, []}, diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk index d294d0006e..e34500b3ab 100644 --- a/lib/inets/vsn.mk +++ b/lib/inets/vsn.mk @@ -18,7 +18,7 @@ # %CopyrightEnd% APPLICATION = inets -INETS_VSN = 5.7.2 +INETS_VSN = 5.7.3 PRE_VSN = APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)" |