summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>2002-01-05 18:23:53 +0000
committerfenner <fenner@FreeBSD.org>2002-01-05 18:23:53 +0000
commit1a8ac98fc300bb326db6c311e2ccad071279296a (patch)
treeda4aa4712ea96ea80c4878ebfc6f96bd0aa823b3 /sys/netinet
parent48fb74e4c1c15bb7772c0e09198a794dfafe502c (diff)
downloadFreeBSD-src-1a8ac98fc300bb326db6c311e2ccad071279296a.zip
FreeBSD-src-1a8ac98fc300bb326db6c311e2ccad071279296a.tar.gz
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.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_output.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 3e1ddb7..6185db0 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -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)) {
OpenPOWER on IntegriCloud