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
This commit is contained in:
qingli 2009-07-28 17:16:54 +00:00
parent 9fe0f9467b
commit 4092d532fe

View File

@ -174,7 +174,8 @@ ether_output(struct ifnet *ifp, struct mbuf *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