summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2012-04-12 22:04:16 +0800
committerMatt Johnston <matt@ucc.asn.au>2012-04-12 22:04:16 +0800
commit6467b8d903465a9760f4ee9624cac755b18fbcf2 (patch)
tree1a75d5391fae1645da3fbf02dd006ed6b77afe14
parent3e2b6a18211671b42f4a7803ff33401ae0785ee3 (diff)
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
-rw-r--r--svr-runopts.c2
1 files changed, 1 insertions, 1 deletions
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 */