INN commit: trunk/lib (network.c)

INN Commit Russ_Allbery at isc.org
Tue Nov 21 09:51:33 UTC 2006


    Date: Tuesday, November 21, 2006 @ 01:51:32
  Author: eagle
Revision: 7586

The final argument to inet_pton should be a pointer to an in6_addr,
not to a sockaddr_in6.  Fix network_source for IPv6 bind addresses.

Modified:
  trunk/lib/network.c

-----------+
 network.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Modified: network.c
===================================================================
--- network.c	2006-11-21 09:37:51 UTC (rev 7585)
+++ network.c	2006-11-21 09:51:32 UTC (rev 7586)
@@ -384,7 +384,7 @@
             return true;
         memset(&saddr, 0, sizeof(saddr));
         saddr.sin6_family = AF_INET6;
-        if (inet_pton(AF_INET6, source, &saddr) < 1)
+        if (inet_pton(AF_INET6, source, &saddr.sin6_addr) < 1)
             return false;
         return bind(fd, (struct sockaddr *) &saddr, sizeof(saddr)) == 0;
     }



More information about the inn-committers mailing list