Remember to zero sockaddr_in struct before calling uaddr_to_sockaddr() to
populate it. Not doing this can result in a garbage sockaddr_in, which will cause connect() to block inside clnttcp_create().
This commit is contained in:
parent
f2305d469b
commit
c88fdb1d1d
|
@ -323,6 +323,7 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid)
|
|||
sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4);
|
||||
useua = &ipuaddr[0];
|
||||
|
||||
bzero((char *)&sin, sizeof(sin));
|
||||
if (uaddr_to_sockaddr(useua, &sin)) {
|
||||
msg("unable to translate uaddr to sockaddr.");
|
||||
if (needfree)
|
||||
|
|
Loading…
Reference in New Issue