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.
This commit is contained in:
parent
aec3d8022a
commit
b7e30ec83d
1 changed files with 2 additions and 2 deletions
|
@ -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)){
|
||||
|
|
Loading…
Reference in a new issue