diff options
author | Russ Cox <rsc@swtch.com> | 2008-06-11 06:35:51 -0700 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-06-11 06:35:51 -0700 |
commit | e082105c33333969c3b3e29349801b5d9abf6932 (patch) | |
tree | 79232d57c500546af0cdb29894350ba146a5440e | |
parent | 226cc90ba74e5dbe2948f2ceef8e05afa5c7cc09 (diff) | |
download | plan9port-e082105c33333969c3b3e29349801b5d9abf6932.tar.gz plan9port-e082105c33333969c3b3e29349801b5d9abf6932.tar.bz2 plan9port-e082105c33333969c3b3e29349801b5d9abf6932.zip |
lib9: make netmkaddr handle unix! addresses better
-rw-r--r-- | src/lib9/netmkaddr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib9/netmkaddr.c b/src/lib9/netmkaddr.c index b476516d..832f7e28 100644 --- a/src/lib9/netmkaddr.c +++ b/src/lib9/netmkaddr.c @@ -46,11 +46,17 @@ netmkaddr(char *linear, char *defnet, char *defsrv) return linear; /* + * if the network is unix, no service + */ + if(strncmp(linear, "unix!", 5) == 0) + return linear; + + /* * add default service */ if(defsrv == 0) return linear; - snprint(addr, sizeof(addr), "%s!%s", linear, defsrv); + snprint(addr, sizeof(addr), "%s!%s", linear, defsrv); return addr; } |