Erlang Mailing Lists

Author Message

<  Erlang bugs mailing list  ~  R13B04: ssh:connect to an IPv6 address doesn't work

jj1bdx
Posted: Sun Mar 21, 2010 5:39 am Reply with quote
User Joined: 11 Sep 2008 Posts: 92
A simple call to
ssh:connect("::1", 22, [])
fails with
{error, nxdomain}

I suspect something wrong with choosing the Callback variable
in ssh_transport:do_connect/5, but no further tracking so far.

Kenji Rikitake

________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org

Post received from mailinglist
View user's profile Send private message
Guest
Posted: Mon Mar 22, 2010 9:43 am Reply with quote
Guest
Hello!

It looks like you've found a bug.

%% ssh:connect/4

DisableIpv6 = proplists:get_value(ip_v6_disabled, Opts, false),
Inet = inetopt(DisableIpv6),

Which invokes the local function:

inetopt(true) ->
inet6;
inetopt(false) ->
inet.

I.e, the return values have been mixed up. If you try the following it
should work for you:

erl> ssh:connect("::1", 22, [{ip_v6_disabled, true}]).

But this needs to be sorted out in the SSH application.

/Niclas @ Erlang/OTP

On Sun, 21 Mar 2010, Kenji Rikitake wrote:

> A simple call to
> ssh:connect("::1", 22, [])
> fails with
> {error, nxdomain}
>
> I suspect something wrong with choosing the Callback variable
> in ssh_transport:do_connect/5, but no further tracking so far.
>
> Kenji Rikitake
>
> ________________________________________________________________
> erlang-bugs (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
>



________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org

Post received from mailinglist
jj1bdx
Posted: Mon Mar 22, 2010 11:35 am Reply with quote
User Joined: 11 Sep 2008 Posts: 92
Hello Niclas: you're right on the reversed ip_v6_disabled option.
My sshrpc code worked OK when ip_v6_disabled is set to *true*.
A confirmation and FYI.
Kenji Rikitake

In the message <Pine.LNX.4.64.1003221032120.29460@mallor.du.uab.ericsson.se>
dated Mon, Mar 22, 2010 at 10:42:04AM +0100,
Niclas Eklund <nick@erix.ericsson.se> writes:
> Hello!
>
> It looks like you've found a bug.
>
> %% ssh:connect/4
>
> DisableIpv6 = proplists:get_value(ip_v6_disabled, Opts, false),
> Inet = inetopt(DisableIpv6),
>
> Which invokes the local function:
>
> inetopt(true) ->
> inet6;
> inetopt(false) ->
> inet.
>
> I.e, the return values have been mixed up. If you try the following it
> should work for you:
>
> erl> ssh:connect("::1", 22, [{ip_v6_disabled, true}]).
>
> But this needs to be sorted out in the SSH application.
>
> /Niclas @ Erlang/OTP
>
> On Sun, 21 Mar 2010, Kenji Rikitake wrote:
>
> >A simple call to
> >ssh:connect("::1", 22, [])
> >fails with
> >{error, nxdomain}
> >
> >I suspect something wrong with choosing the Callback variable
> >in ssh_transport:do_connect/5, but no further tracking so far.
> >
> >Kenji Rikitake

________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org

Post received from mailinglist
View user's profile Send private message
Guest
Posted: Mon Mar 22, 2010 2:45 pm Reply with quote
Guest
Hello!

I've updated the internal function as follows:

inetopt(true) ->
inet;
inetopt(false) ->
inet6.

The configuration parameter ip_v6_disabled is also documented now. As
soon as this has been pushed to github, you can access this via the
dev-branch. The correct usage will be:

erl> ssh:connect("::1", 22, [{ip_v6_disabled, false}]).

/Niclas @ Erlang/OTP

On Mon, 22 Mar 2010, Kenji Rikitake wrote:

> Hello Niclas: you're right on the reversed ip_v6_disabled option.
> My sshrpc code worked OK when ip_v6_disabled is set to *true*.
> A confirmation and FYI.
> Kenji Rikitake
>
> In the message <Pine.LNX.4.64.1003221032120.29460@mallor.du.uab.ericsson.se>
> dated Mon, Mar 22, 2010 at 10:42:04AM +0100,
> Niclas Eklund <nick@erix.ericsson.se> writes:
>> Hello!
>>
>> It looks like you've found a bug.
>>
>> %% ssh:connect/4
>>
>> DisableIpv6 = proplists:get_value(ip_v6_disabled, Opts, false),
>> Inet = inetopt(DisableIpv6),
>>
>> Which invokes the local function:
>>
>> inetopt(true) ->
>> inet6;
>> inetopt(false) ->
>> inet.
>>
>> I.e, the return values have been mixed up. If you try the following it
>> should work for you:
>>
>> erl> ssh:connect("::1", 22, [{ip_v6_disabled, true}]).
>>
>> But this needs to be sorted out in the SSH application.
>>
>> /Niclas @ Erlang/OTP
>>
>> On Sun, 21 Mar 2010, Kenji Rikitake wrote:
>>
>>> A simple call to
>>> ssh:connect("::1", 22, [])
>>> fails with
>>> {error, nxdomain}
>>>
>>> I suspect something wrong with choosing the Callback variable
>>> in ssh_transport:do_connect/5, but no further tracking so far.
>>>
>>> Kenji Rikitake
>
> ________________________________________________________________
> erlang-bugs (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
>



________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org

Post received from mailinglist
Reverse Internet
Posted: Sat Apr 10, 2010 5:12 am Reply with quote
Joined: 10 Apr 2010 Posts: 1
Reverseinternet.com has recently launched reverse IP address lookup service that can find other websites hosted on the same IP. You can also cross-reference websites based on Google Analytics and Google AdSense IDs.
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum