svn commit: r246490 - user/ae/inet6/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Thu Feb 7 17:14:16 UTC 2013


Author: ae
Date: Thu Feb  7 17:14:16 2013
New Revision: 246490
URL: http://svnweb.freebsd.org/changeset/base/246490

Log:
  Use in6ifa_ifwithaddr function.

Modified:
  user/ae/inet6/sys/netinet6/ip6_input.c

Modified: user/ae/inet6/sys/netinet6/ip6_input.c
==============================================================================
--- user/ae/inet6/sys/netinet6/ip6_input.c	Thu Feb  7 16:39:36 2013	(r246489)
+++ user/ae/inet6/sys/netinet6/ip6_input.c	Thu Feb  7 17:14:16 2013	(r246490)
@@ -769,14 +769,7 @@ passin:
 		 * found the loopback route to the interface address
 		 */
 		if (rin6.ro_rt->rt_gateway->sa_family == AF_LINK) {
-			struct sockaddr_in6 dest6;
-
-			bzero(&dest6, sizeof(dest6));
-			dest6.sin6_family = AF_INET6;
-			dest6.sin6_len = sizeof(dest6);
-			dest6.sin6_addr = ip6->ip6_dst;
-			ia6 = (struct in6_ifaddr *)
-			    ifa_ifwithaddr((struct sockaddr *)&dest6);
+			ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0);
 			if (ia6 == NULL)
 				goto bad;
 			free_ia6 = 1;


More information about the svn-src-user mailing list