[erlang-questions] ip_v6_disabled cannot be set for ssh connection in OTP R15B01

7 views
Skip to first unread message

William Yangzhuwei

unread,
Jun 18, 2012, 8:08:52 AM6/18/12
to erlang-q...@erlang.org
hello,

Once I try to connect with ssh with ip_v6_disabled = true, like following

 ssh:connect("some hostname",2022,[{user,"user"},
 {password,"pwd"},
 {user_interaction,false},
 {user_dir,"/tmp/tmp.6xqteJfWII"},
 {silently_accept_hosts,true},
 {ip_v6_disabled,true}],infinity)

I will got some error return

{error,
                                            {eoptions,{ip_v6_disabled,true}}}


I have check the code of OTP,
These two lines looks strange.

handle_ssh_option({ip_v6_disabled, Value} = Opt) when is_function(Value) ->
    Opt;

Why it must be a function?

BTW, ip_v6_disabled = true works in R14B

--
Best Regards
//William YangZhuwei

Attila Rajmund Nohl

unread,
Jun 18, 2012, 8:19:46 AM6/18/12
to William Yangzhuwei, erlang-q...@erlang.org
2012/6/18 William Yangzhuwei <msc...@gmail.com>:
> hello,
>
> Once I try to connect with ssh with ip_v6_disabled = true, like following
>
>  ssh:connect("some hostname",2022,[{user,"user"},
>  {password,"pwd"},
>  {user_interaction,false},
>  {user_dir,"/tmp/tmp.6xqteJfWII"},
>  {silently_accept_hosts,true},
>  {ip_v6_disabled,true}],infinity)
>
> I will got some error return
>
> {error,
>
> {eoptions,{ip_v6_disabled,true}}}
>
>
> I have check the code of OTP,
> These two lines looks strange.
>
> handle_ssh_option({ip_v6_disabled, Value} = Opt) when is_function(Value) ->
>     Opt;
>
> Why it must be a function?

That's a copy&paste error, fixed in this commit:
https://github.com/erlang/otp/commit/b85e884f14e1dce52af7157045625f1ef5441ed1
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

William Yangzhuwei

unread,
Jun 18, 2012, 8:42:02 AM6/18/12
to Attila Rajmund Nohl, erlang-q...@erlang.org
Thanks for your reply.

This fix will be included in next release then, I guess.

BRs//William


On Mon, Jun 18, 2012 at 2:19 PM, Attila Rajmund Nohl <attila...@gmail.com> wrote:
2012/6/18 William Yangzhuwei <msc...@gmail.com>:
> hello,
>
> Once I try to connect with ssh with ip_v6_disabled = true, like following
>
>  ssh:connect("some hostname",2022,[{user,"user"},
>  {password,"pwd"},
>  {user_interaction,false},
>  {user_dir,"/tmp/tmp.6xqteJfWII"},
>  {silently_accept_hosts,true},
>  {ip_v6_disabled,true}],infinity)
>
> I will got some error return
>
> {error,
>
> {eoptions,{ip_v6_disabled,true}}}
>
>
> I have check the code of OTP,
> These two lines looks strange.
>
> handle_ssh_option({ip_v6_disabled, Value} = Opt) when is_function(Value) ->
>     Opt;
>
> Why it must be a function?

That's a copy&paste error, fixed in this commit:
https://github.com/erlang/otp/commit/b85e884f14e1dce52af7157045625f1ef5441ed1



Ingela Andin

unread,
Jun 18, 2012, 3:26:32 PM6/18/12
to William Yangzhuwei, erlang-q...@erlang.org
Hi!

2012/6/18 William Yangzhuwei <msc...@gmail.com>:
> hello,
>
> Once I try to connect with ssh with ip_v6_disabled = true, like following
>
>  ssh:connect("some hostname",2022,[{user,"user"},
>  {password,"pwd"},
>  {user_interaction,false},
>  {user_dir,"/tmp/tmp.6xqteJfWII"},
>  {silently_accept_hosts,true},
>  {ip_v6_disabled,true}],infinity)
>
> I will got some error return
>
> {error,
>
> {eoptions,{ip_v6_disabled,true}}}
>
>
> I have check the code of OTP,
> These two lines looks strange.
>
> handle_ssh_option({ip_v6_disabled, Value} = Opt) when is_function(Value) ->
>     Opt;
>
> Why it must be a function?

That is a bug, it has been fixed in the upcoming version.

Regards Ingela Erlang/OTP team - Ericsson AB
Reply all
Reply to author
Forward
0 new messages