svn rev #19408: trunk/src/kdc/

raeburn@MIT.EDU raeburn at MIT.EDU
Sat Apr 7 01:15:32 EDT 2007


Commit By: raeburn
Log Message: 
ticket: new
subject: use IP(V6)_PKTINFO in KDC for UDP sockets

As Denis Vlasenko pointed out in ticket 3306, using IP(V6)_PKTINFO to
get or set the local address in UDP communications instead of
allocating one socket for each address seen at startup will behave
better in environments where the addresses may change while the KDC is
running, or in certain unusual network configurations.

The patch from Denis was specific to Linux (didn't do IPV6_PKTINFO if
IP_PKTINFO wasn't defined).  I've reworked it a fair amount, and
tested the results briefly on Mac OS X (which has IPV6_PKTINFO but not
IP_PKTINFO) and Linux (which has both).

With this change, on systems like Linux supporting both socket
options, the KDC should be able to use just two UDP sockets, one for
IPv4 and one for IPv6.  (And if we turned off IPV6_V6ONLY, we might do
with one.)

Filed as a separate ticket, because Denis's complaint and patch in
3306 cover the RPC code as well.



Changed Files:
U   trunk/src/kdc/network.c



More information about the cvs-krb5 mailing list