Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jul 2009 17:16:55 +0000 (UTC)
From:      Qing Li <qingli@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r195921 - head/sys/net
Message-ID:  <200907281716.n6SHGtGC038664@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: qingli
Date: Tue Jul 28 17:16:54 2009
New Revision: 195921
URL: http://svn.freebsd.org/changeset/base/195921

Log:
  The new flow table caches both the routing table entry as well as the
  L2 information. For an indirect route the cached L2 entry contains the
  MAC address of the gateway. Typically the default route is used to
  transmit multicast packets when explicit multicast routes are not
  available. The ether_output() function bypasses L2 resolution function
  if it verifies the L2 cache is valid, because the cached L2 address
  (a unicast MAC address) is copied into the packets as the destination
  MAC address. This validation, however, does not apply to broadcast and
  multicast packets because the destination MAC address is mapped
  according to a standard method instead.
  
  Submitted by:	Xin Li
  Reviewed by:	bz
  Approved by:	re

Modified:
  head/sys/net/if_ethersubr.c

Modified: head/sys/net/if_ethersubr.c
==============================================================================
--- head/sys/net/if_ethersubr.c	Tue Jul 28 15:57:53 2009	(r195920)
+++ head/sys/net/if_ethersubr.c	Tue Jul 28 17:16:54 2009	(r195921)
@@ -174,7 +174,8 @@ ether_output(struct ifnet *ifp, struct m
 	int hlen;	/* link layer header length */
 
 	if (ro != NULL) {
-		lle = ro->ro_lle;
+		if (!(m->m_flags & (M_BCAST | M_MCAST)))
+			lle = ro->ro_lle;
 		rt0 = ro->ro_rt;
 	}
 #ifdef MAC



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