PERFORCE change 153454 for review

Sam Leffler sam at FreeBSD.org
Mon Nov 24 10:09:39 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=153454

Change 153454 by sam at sam_ebb on 2008/11/24 18:09:36

	restore INET/INET6 #ifdef's; this is temporary as I've got a better
	idea how to handle this stuff

Affected files ...

.. //depot/projects/arp-v2/src/sys/net/if_llatbl.c#8 edit

Differences ...

==== //depot/projects/arp-v2/src/sys/net/if_llatbl.c#8 (text+ko) ====

@@ -326,14 +326,16 @@
 
 	ifp = llt->llt_ifp;
 	switch (l3addr->sa_family) {
+#ifdef INET
 	case AF_INET:
 		hashkey = ((struct sockaddr_in *)l3addr)->sin_addr.s_addr;
 		break;
-
+#endif
+#ifdef INET6
 	case AF_INET6:
 		hashkey = ((struct sockaddr_in6 *)l3addr)->sin6_addr.s6_addr32[3];
 		break;
-
+#endif
 	default:
 		return NULL;
 	}
@@ -357,6 +359,7 @@
 		if (!(flags & LLE_IFADDR)) {
 			rt = rtalloc1(l3addr, 0, 0);
 			if ((rt == NULL) || (rt->rt_flags & RTF_GATEWAY) || (rt->rt_ifp != ifp)) {
+#ifdef INET6
 				if (l3addr->sa_family == AF_INET6) {
 					/* 
 					 * Creating a ND6 cache for an IPv6 neighbor 
@@ -370,11 +373,14 @@
 						goto lla_lookup_1;
 					}
 				}
+#endif
 				switch (l3addr->sa_family) {
+#ifdef INET
 				case AF_INET:
 					log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n", \
 					    inet_ntoa(((struct sockaddr_in *)l3addr)->sin_addr));
 					break;
+#endif
 #ifdef INET6
 				case AF_INET6:
 					log(LOG_INFO, "IPv6 address: \"%s\" is not on the network\n", \
@@ -389,7 +395,9 @@
 			}
 			rtfree(rt);
 		}
+#ifdef INET6
 lla_lookup_1:
+#endif
 		lle = uma_zalloc(llezone, M_DONTWAIT | M_ZERO);
 		if (lle == NULL) {
 			log(LOG_INFO, "lla_lookup: new lle malloc failed\n");


More information about the p4-projects mailing list