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>
This commit is contained in:
Ian Dowse 2001-04-26 17:24:05 +00:00
parent 025f2858dd
commit f2b95b20dc

View file

@ -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;