Pre-calculate the checksum for multicast packets sourced on a

multicast router.  This is overkill; it should be possible to
delay to hardware interfaces and only pre-calculate when forwarding
to a tunnel.
This commit is contained in:
fenner 2002-01-05 18:23:53 +00:00
parent a8ea48b571
commit aa5c2fdde5

View File

@ -325,6 +325,18 @@ ip_output(m0, opt, ro, flags, imo)
ip->ip_src = IA_SIN(ia)->sin_addr;
}
if (ip_mrouter && (flags & IP_FORWARDING) == 0) {
/*
* XXX
* delayed checksums are not currently
* compatible with IP multicast routing
*/
if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
in_delayed_cksum(m);
m->m_pkthdr.csum_flags &=
~CSUM_DELAY_DATA;
}
}
IN_LOOKUP_MULTI(pkt_dst, ifp, inm);
if (inm != NULL &&
(imo == NULL || imo->imo_multicast_loop)) {