Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Nov 2010 12:27:40 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r215559 - head/sys/netinet6
Message-ID:  <201011201227.oAKCRemT011730@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sat Nov 20 12:27:40 2010
New Revision: 215559
URL: http://svn.freebsd.org/changeset/base/215559

Log:
  In case of an early return from the function there is no need to zero
  the route upfront, so defer as long as we can.
  
  MFC after:	3 days

Modified:
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/netinet6/nd6_nbr.c
==============================================================================
--- head/sys/netinet6/nd6_nbr.c	Sat Nov 20 12:26:31 2010	(r215558)
+++ head/sys/netinet6/nd6_nbr.c	Sat Nov 20 12:27:40 2010	(r215559)
@@ -390,8 +390,6 @@ nd6_ns_output(struct ifnet *ifp, const s
 	caddr_t mac;
 	struct route_in6 ro;
 
-	bzero(&ro, sizeof(ro));
-
 	if (IN6_IS_ADDR_MULTICAST(taddr6))
 		return;
 
@@ -418,6 +416,8 @@ nd6_ns_output(struct ifnet *ifp, const s
 		return;
 	m->m_pkthdr.rcvif = NULL;
 
+	bzero(&ro, sizeof(ro));
+
 	if (daddr6 == NULL || IN6_IS_ADDR_MULTICAST(daddr6)) {
 		m->m_flags |= M_MCAST;
 		im6o.im6o_multicast_ifp = ifp;



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