Patches from Alec Peterson, plus some work of my own, to let a multihomed
authorKen Raeburn <raeburn@mit.edu>
Fri, 25 Feb 2000 20:46:35 +0000 (20:46 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 25 Feb 2000 20:46:35 +0000 (20:46 +0000)
commitd2e5db39ff65837c07cdbf5b2669455667678bfb
treefdbbeb6480342010de5465950a4c0415e1b4d253
parent8d1ebc57fdcdc8da25aa3e96b90b0c6c8daebccb
Patches from Alec Peterson, plus some work of my own, to let a multihomed
KDC respond to requests from the same IP address that the requests were sent
to.

**N.B. This will perform worse in the case of addresses dynamically added
and removed after the KDC has started, since it will be incapable of using
any new addresses.

I'm unclear on why the loopback interface address needs to be included in
the list of addresses.  Apparently, on NetBSD-current, if it's not, packets
sent to other local addresses but over the loopback interface are queued but
not received??  Needs further investigation; could just be a NetBSD bug.

* configure.in: Invoke KRB5_SOCKADDR_SA_LEN.

* network.c: Include <sys/ioctl.h>, <syslog.h>, <net/if.h>.
(foreach_localaddr): New function, copied from
lib/krb5/os/localaddr.c.  Tweaked to not exclude loopback
interface.
(NEED_SOCKETS): Define before including k5-int.h.
(n_sockets): New variable.
(setup_port): New function; creates listening udp ports given an
address.
(setup_network): Call foreach_localaddr to set up listening
sockets on each local address, so we can always respond from the
receiving address.
(listen_and_process): Use n_sockets as upper bound of loop.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12070 dc483132-0cff-0310-8789-dd5450dbe970
src/kdc/ChangeLog
src/kdc/configure.in
src/kdc/network.c