summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-04-26 17:24:05 +0000
committeriedowse <iedowse@FreeBSD.org>2001-04-26 17:24:05 +0000
commitcd1f3817def48e94fbb6cff073d5bbbd52594967 (patch)
tree0eb19a58f49933a0435955e317a678dcfa51773e
parentcd85442a9cb3b77494f52bde72f1c4bca863cba6 (diff)
downloadFreeBSD-src-cd1f3817def48e94fbb6cff073d5bbbd52594967.zip
FreeBSD-src-cd1f3817def48e94fbb6cff073d5bbbd52594967.tar.gz
The function __rpc_uaddr2taddr_af() converts an RPC "universal
address" string to a netbuf/sockaddr "transport address". In the case of an AF_LOCAL address, it was missing the code to actually point the netbuf at the newly allocated sockaddr_un, so the caller ended up with a netbuf containing junk. Submitted by: Martin Blapp <mb@imp.ch>
-rw-r--r--lib/libc/rpc/rpc_generic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/rpc/rpc_generic.c b/lib/libc/rpc/rpc_generic.c
index 7b00d2c..81f0b6d 100644
--- a/lib/libc/rpc/rpc_generic.c
+++ b/lib/libc/rpc/rpc_generic.c
@@ -710,6 +710,8 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr)
memset(sun, 0, sizeof *sun);
sun->sun_family = AF_LOCAL;
strncpy(sun->sun_path, addrstr, sizeof(sun->sun_path) - 1);
+ ret->len = ret->maxlen = sun->sun_len = SUN_LEN(sun);
+ ret->buf = sun;
break;
default:
break;
OpenPOWER on IntegriCloud