diff svr-runopts.c @ 671:675bbd630f5d

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
author Matt Johnston <matt@ucc.asn.au>
date Thu, 12 Apr 2012 22:04:16 +0800
parents e27d7fb23376
children c58a15983808
line wrap: on
line diff
--- a/svr-runopts.c	Thu Apr 12 21:57:30 2012 +0800
+++ b/svr-runopts.c	Thu Apr 12 22:04:16 2012 +0800
@@ -325,7 +325,7 @@
 		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 */