From 6467b8d903465a9760f4ee9624cac755b18fbcf2 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Thu, 12 Apr 2012 22:04:16 +0800 Subject: [PATCH] Split listening port argument at the rightmost colon, allows binding to specific IPv6 addresses. From OpenWRT, https://dev.openwrt.org/browser/trunk/package/dropbear/patches/300-ipv6_addr_port_split.patch --- svr-runopts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svr-runopts.c b/svr-runopts.c index c6e3508..2e5edc5 100644 --- a/svr-runopts.c +++ b/svr-runopts.c @@ -325,7 +325,7 @@ static void addportandaddress(char* spec) { myspec = m_strdup(spec); /* search for ':', that separates address and port */ - svr_opts.ports[svr_opts.portcount] = strchr(myspec, ':'); + svr_opts.ports[svr_opts.portcount] = strrchr(myspec, ':'); if (svr_opts.ports[svr_opts.portcount] == NULL) { /* no ':' -> the whole string specifies just a port */