]> git.ipfire.org Git - thirdparty/krb5.git/commit
Use binresvport_sa when creating RPC handles
authorAndreas Schneider <asn@samba.org>
Mon, 2 Jun 2014 18:46:48 +0000 (20:46 +0200)
committerGreg Hudson <ghudson@mit.edu>
Fri, 27 Jun 2014 23:36:40 +0000 (19:36 -0400)
commitb272744422dea77fdf9518a20386660df7a97bf7
tree348cfb4c66f3c3775b50165a268472f04ff47dfb
parent0d04b60d159ab83b943e43802b1449a3b074bc83
Use binresvport_sa when creating RPC handles

Make clnttcp_create, clntudp_bufcreate, svctcp_create, and
svcudp_bufcreate work with unbound IPv6 sockets using bindresvport_sa
and other socket helpers.  For caller-supplied sockets, call
getsockname to determine the address family we should attempt to bind.

[ghudson@mit.edu: clarified commit message, minimized code changes,
used socket-utils.h helpers, fixed fallback find on bindresvport
failure, restored getsockaddr call to get port after binding]

ticket: 7935
src/lib/rpc/clnt_tcp.c
src/lib/rpc/clnt_udp.c
src/lib/rpc/svc_tcp.c
src/lib/rpc/svc_udp.c