Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2002 23:44:50 -0600 (CST)
From:      mark tinguely <tinguely@web.cs.ndsu.nodak.edu>
To:        finlayson@live.com, tinguely@web.cs.ndsu.nodak.edu
Cc:        freebsd-multimedia@freebsd.org, freebsd-questions@freebsd.org
Subject:   Re: MBone/mrouted troubles
Message-ID:  <200201260544.g0Q5ioC34521@web.cs.ndsu.nodak.edu>
In-Reply-To: <4.3.1.1.20020125211645.00c7e3a0@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help

I got a request for Bill Fenner's UDP checksum fix for multicast forwarding.
And thought other would like it too. This patch is relative to FreeBSD 4.5RC1's
sys/netinet/ip_output.c. The offsets will differ slightly on FreeBSD 4.4 :

--- ip_output.c.orig	Fri Dec 28 04:08:33 2001
+++ ip_output.c	Fri Jan 25 09:23:21 2002
@@ -350,6 +350,16 @@
 				 */
 				if (!rsvp_on)
 				  imo = NULL;
+				/*
+				 * 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;
+				}
 				if (ip_mforward(ip, ifp, m, imo) != 0) {
 					m_freem(m);
 					goto done;
@@ -1887,6 +1897,17 @@
 	register struct ip *ip;
 	struct mbuf *copym;
 
+	/*
+	 * XXX
+	 * delayed checksums are not currently
+	 * compatible with IP multicast routing.
+	 * Can't do this on copym because it may
+	 * be shared.
+	 */
+	if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
+		in_delayed_cksum(m);
+		m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
+	}
 	copym = m_copy(m, 0, M_COPYALL);
 	if (copym != NULL && (copym->m_flags & M_EXT || copym->m_len < hlen))
 		copym = m_pullup(copym, hlen);
@@ -1927,12 +1948,6 @@
 		copym->m_pkthdr.rcvif = ifp;
 		ip_input(copym);
 #else
-		/* if the checksum hasn't been computed, mark it as valid */
-		if (copym->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
-			copym->m_pkthdr.csum_flags |=
-			    CSUM_DATA_VALID | CSUM_PSEUDO_HDR;
-			copym->m_pkthdr.csum_data = 0xffff;
-		}
 		if_simloop(ifp, copym, dst->sin_family, 0);
 #endif
 	}


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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