[REGRESSION] ssh link-local addresses fails with "Servname not supported for ai_socktype"

Gui Iribarren gui at altermundi.net
Tue Jan 28 21:13:10 WST 2014


Hello,
I bumped into an... interesting... regression introduced by

http://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/2013q2/001390.html

which breaks the possibility to connect to ipv6 link-local addresses, 
since '%' is actually the separator for the interface identifier.

symptom is:
# ssh fe80::f8d1:11ff:fea0:fc%wlan0
ssh: Exited: Error resolving 'fe80::f8d1:11ff:fea0:fc' port 'wlan0'.
Servname not supported for ai_socktype

and jow
https://lists.openwrt.org/pipermail/openwrt-devel/2014-January/023526.html
kindly pointed me to this mailing list.

given it was introduced by a one-liner, maybe another one-liner could 
fix it?

Signed-off-by: Gui Iribarren <gui at altermundi.net>

---

diff --git a/cli-runopts.c b/cli-runopts.c
index 8ffd997..acf738e 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -620,7 +620,7 @@ static void parse_hostname(const char* orighostarg) {
                 cli_opts.username = m_strdup(cli_opts.own_user);
         }

-       port = strchr(cli_opts.remotehost, '%');
+       port = strchr(cli_opts.remotehost, '^');
         if (!port)  {
                 // legacy separator
                 port = strchr(cli_opts.remotehost, '/');


More information about the Dropbear mailing list