From owner-freebsd-questions Fri Jan 25 21:45: 6 2002 Delivered-To: freebsd-questions@freebsd.org Received: from web.cs.ndsu.nodak.edu (web.cs.ndsu.NoDak.edu [134.129.125.7]) by hub.freebsd.org (Postfix) with ESMTP id 9739037B404; Fri, 25 Jan 2002 21:44:53 -0800 (PST) Received: (from tinguely@localhost) by web.cs.ndsu.nodak.edu (8.11.4/8.11.4) id g0Q5ioC34521; Fri, 25 Jan 2002 23:44:50 -0600 (CST) (envelope-from tinguely) Date: Fri, 25 Jan 2002 23:44:50 -0600 (CST) From: mark tinguely Message-Id: <200201260544.g0Q5ioC34521@web.cs.ndsu.nodak.edu> To: finlayson@live.com, tinguely@web.cs.ndsu.nodak.edu Subject: Re: MBone/mrouted troubles Cc: freebsd-multimedia@freebsd.org, freebsd-questions@freebsd.org In-Reply-To: <4.3.1.1.20020125211645.00c7e3a0@localhost> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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