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

Andrey V. Elsukov ae at FreeBSD.org
Thu Feb 7 15:22:51 UTC 2013


Author: ae
Date: Thu Feb  7 15:22:50 2013
New Revision: 246483
URL: http://svnweb.freebsd.org/changeset/base/246483

Log:
  Move the multicast check into first place.

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 15:20:54 2013	(r246482)
+++ user/ae/inet6/sys/netinet6/ip6_input.c	Thu Feb  7 15:22:50 2013	(r246483)
@@ -652,6 +652,17 @@ ip6_input(struct mbuf *m)
 
 passin:
 	/*
+	 * Multicast check. Assume packet is for us to avoid
+	 * prematurely taking locks.
+	 */
+	if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
+		ours = 1;
+		in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_mcast);
+		deliverifp = m->m_pkthdr.rcvif;
+		goto hbhcheck;
+	}
+
+	/*
 	 * Disambiguate address scope zones (if there is ambiguity).
 	 * in6_setscope() then also checks and rejects the cases where src or
 	 * dst are the loopback address and the receiving interface
@@ -664,17 +675,6 @@ passin:
 	}
 
 	/*
-	 * Multicast check. Assume packet is for us to avoid
-	 * prematurely taking locks.
-	 */
-	if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
-		ours = 1;
-		in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_mcast);
-		deliverifp = m->m_pkthdr.rcvif;
-		goto hbhcheck;
-	}
-
-	/*
 	 *  Unicast check
 	 */
 


More information about the svn-src-user mailing list