svn rev #21748: trunk/src/kadmin/server/
raeburn@MIT.EDU
raeburn at MIT.EDU
Wed Jan 14 18:36:11 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=21748
Commit By: raeburn
Log Message:
ticket: 6335
If we have a local UDP socket without the PKTINFO option set, it's
bound to a local address, so use getsockname to extract the local
(destination) address.
Changed Files:
U trunk/src/kadmin/server/network.c
Modified: trunk/src/kadmin/server/network.c
===================================================================
--- trunk/src/kadmin/server/network.c 2009-01-14 21:29:10 UTC (rev 21747)
+++ trunk/src/kadmin/server/network.c 2009-01-14 23:36:04 UTC (rev 21748)
@@ -1401,6 +1401,17 @@
}
#endif
+ if (daddr_len == 0 && conn->type == CONN_UDP) {
+ /* If the PKTINFO option isn't set, this socket should be
+ bound to a specific local address. This info probably
+ should've been saved in our socket data structure at setup
+ time. */
+ daddr_len = sizeof(daddr);
+ if (getsockname(port_fd, (struct sockaddr *)&daddr, &daddr_len) != 0)
+ daddr_len = 0;
+ /* On failure, keep going anyways. */
+ }
+
request.length = cc;
request.data = pktbuf;
faddr.address = &addr;
More information about the cvs-krb5
mailing list