Skip to content
Snippets Groups Projects
Commit 6467b8d9 authored by Matt Johnston's avatar Matt Johnston
Browse files

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
parent 3e2b6a18
No related merge requests found
...@@ -325,7 +325,7 @@ static void addportandaddress(char* spec) { ...@@ -325,7 +325,7 @@ static void addportandaddress(char* spec) {
myspec = m_strdup(spec); myspec = m_strdup(spec);
/* search for ':', that separates address and port */ /* 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) { if (svr_opts.ports[svr_opts.portcount] == NULL) {
/* no ':' -> the whole string specifies just a port */ /* no ':' -> the whole string specifies just a port */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment