aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-06-15 16:48:20 +0200
committerMicael Karlberg <[email protected]>2011-06-15 16:48:20 +0200
commit9d4dd02d9faf0e2a8d51b0b9a033b888afb98a0e (patch)
tree11a17aba8a96c928511f01ed11d1bffe020a67aa /lib
parent704ed1824308f16e0de67c6ff1eae7e80d38232f (diff)
parentdfaf00eb4fb11cdb8470401c47b15d8068b9f8cd (diff)
downloadotp-9d4dd02d9faf0e2a8d51b0b9a033b888afb98a0e.tar.gz
otp-9d4dd02d9faf0e2a8d51b0b9a033b888afb98a0e.tar.bz2
otp-9d4dd02d9faf0e2a8d51b0b9a033b888afb98a0e.zip
[ftp] FTP client doesn't work with IPv6 host.
Attila Rajmund Nohl OTP-9342 Merge branch 'bmk/inets/ftp/does_not_handle_ipv6/OTP-9342' into bmk/inets/inets57_integration2 Conflicts: lib/inets/doc/src/notes.xml lib/inets/src/inets_app/inets.appup.src
Diffstat (limited to 'lib')
-rw-r--r--lib/inets/Makefile4
-rw-r--r--lib/inets/doc/src/notes.xml6
-rw-r--r--lib/inets/src/ftp/ftp.erl4
-rw-r--r--lib/inets/src/inets_app/inets.appup.src6
-rw-r--r--lib/inets/test/inets_test_lib.erl9
5 files changed, 23 insertions, 6 deletions
diff --git a/lib/inets/Makefile b/lib/inets/Makefile
index ec05efa461..f4c2746b0a 100644
--- a/lib/inets/Makefile
+++ b/lib/inets/Makefile
@@ -36,6 +36,8 @@ SPECIAL_TARGETS =
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_subdir.mk
+.PHONY: info gclean
+
info:
@echo "OS: $(OS)"
@echo "DOCB: $(DOCB)"
@@ -44,3 +46,5 @@ info:
@echo "APP_VSN: $(APP_VSN)"
@echo ""
+gclean:
+ git clean -fXd
diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml
index 9071a72266..f9f02a21e2 100644
--- a/lib/inets/doc/src/notes.xml
+++ b/lib/inets/doc/src/notes.xml
@@ -61,6 +61,12 @@
<list>
<item>
+ <p>[ftp] FTP client doesn't work with IPv6 host.</p>
+ <p>Attila Rajmund Nohl</p>
+ <p>Own Id: OTP-9342 Aux Id: seq11853</p>
+ </item>
+
+ <item>
<p>[httpd] Peer/sockname resolv doesn't work with IPv6 addrs
in HTTP. </p>
<p>Attila Rajmund Nohl.</p>
diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl
index fe6cb0c191..ac72963347 100644
--- a/lib/inets/src/ftp/ftp.erl
+++ b/lib/inets/src/ftp/ftp.erl
@@ -1038,10 +1038,12 @@ handle_call({_, {open, ip_comm, Opts}}, From, State) ->
Port = key_search(port, Opts, ?FTP_PORT),
Timeout = key_search(timeout, Opts, ?CONNECTION_TIMEOUT),
Progress = key_search(progress, Opts, ignore),
+ IpFamily = key_search(ipfamily, Opts, inet),
State2 = State#state{client = From,
mode = Mode,
- progress = progress(Progress)},
+ progress = progress(Progress),
+ ipfamily = IpFamily},
?fcrd("handle_call(open) -> setup ctrl connection with",
[{host, Host}, {port, Port}, {timeout, Timeout}]),
diff --git a/lib/inets/src/inets_app/inets.appup.src b/lib/inets/src/inets_app/inets.appup.src
index c432ac82eb..4aa53ae581 100644
--- a/lib/inets/src/inets_app/inets.appup.src
+++ b/lib/inets/src/inets_app/inets.appup.src
@@ -20,7 +20,8 @@
[
{"5.6",
[
- {load_module, http_transport, soft_purge, soft_purge, []}
+ {load_module, http_transport, soft_purge, soft_purge, []},
+ {update, ftp, soft, soft_purge, soft_purge, []}
]
},
{"5.5.2",
@@ -47,7 +48,8 @@
[
{"5.6",
[
- {load_module, http_transport, soft_purge, soft_purge, []}
+ {load_module, http_transport, soft_purge, soft_purge, []},
+ {update, ftp, soft, soft_purge, soft_purge, []}
]
},
{"5.5.2",
diff --git a/lib/inets/test/inets_test_lib.erl b/lib/inets/test/inets_test_lib.erl
index 6cedaf9638..57e5d482c9 100644
--- a/lib/inets/test/inets_test_lib.erl
+++ b/lib/inets/test/inets_test_lib.erl
@@ -303,7 +303,7 @@ connect_byte(ossl, Host, Port) ->
connect_byte(essl, Host, Port) ->
connect(ssl, Host, Port, [{ssl_imp, new}, {packet,0}]);
connect_byte(ip_comm, Host, Port) ->
- Opts = [inet6, {packet,0}],
+ Opts = [inet6, {packet, 0}],
connect(ip_comm, Host, Port, Opts).
@@ -327,10 +327,13 @@ connect(ip_comm, Host, Port, Opts) ->
tsp("nxdomain opts: ~p", [Opts]),
connect(ip_comm, Host, Port, lists:delete(inet6, Opts));
{error, eafnosupport} ->
- tsp("eafnosupport opts: ~p", [Opts]),
+ tsp("eafnosupport when opts: ~p", [Opts]),
+ connect(ip_comm, Host, Port, lists:delete(inet6, Opts));
+ {error, econnreset} ->
+ tsp("econnreset when opts: ~p", [Opts]),
connect(ip_comm, Host, Port, lists:delete(inet6, Opts));
{error, enetunreach} ->
- tsp("eafnosupport opts: ~p", [Opts]),
+ tsp("eafnosupport when opts: ~p", [Opts]),
connect(ip_comm, Host, Port, lists:delete(inet6, Opts));
{error, {enfile,_}} ->
tsp("Error enfile"),