svn commit: r195921 - head/sys/net
Qing Li
qingli at FreeBSD.org
Tue Jul 28 17:16:55 UTC 2009
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
More information about the svn-src-head
mailing list