diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-04-09 19:41:25 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-04-09 19:41:25 +0200 |
commit | b7e30ec83d29272490ef6d76107b1393cd96a059 (patch) | |
tree | 3261ea98cc3896479b5b6f0d2938eb7e7a61d57d | |
parent | aec3d8022ae0aa2f7209970df0399c1242af20c9 (diff) | |
download | plan9front-b7e30ec83d29272490ef6d76107b1393cd96a059.tar.xz |
libc: allow announce address of the form #I1/tcp!*!564
we allow protocol path to begin with # for dial, so should
allow this for announce as well. this is primarily usefull
when booting the fileserver to listen on alternate ip stack.
-rw-r--r-- | sys/src/libc/9sys/announce.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/libc/9sys/announce.c b/sys/src/libc/9sys/announce.c index b2252ed21..68543aafb 100644 --- a/sys/src/libc/9sys/announce.c +++ b/sys/src/libc/9sys/announce.c @@ -218,11 +218,11 @@ nettrans(char *addr, char *naddr, int na, char *file, int nf) werrstr("bad dial string: %s", addr); return -1; } - if(*addr != '/'){ + if(*addr != '/' && *addr != '#'){ strncpy(netdir, "/net", sizeof(netdir)); netdir[sizeof(netdir) - 1] = 0; } else { - for(p2 = p; *p2 != '/'; p2--) + for(p2 = p; p2 > addr && *p2 != '/'; p2--) ; i = p2 - addr; if(i == 0 || i >= sizeof(netdir)){ |