Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2013 15:22:51 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r246483 - user/ae/inet6/sys/netinet6
Message-ID:  <201302071522.r17FMpj3001036@svn.freebsd.org>

index | next in thread | raw e-mail

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
 	 */
 


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302071522.r17FMpj3001036>