From owner-freebsd-hackers Thu Dec 6 20:42:47 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail-blue.research.att.com (mail-blue.research.att.com [135.207.30.102]) by hub.freebsd.org (Postfix) with ESMTP id 1CFE237B419 for ; Thu, 6 Dec 2001 20:42:44 -0800 (PST) Received: from alliance.research.att.com (alliance.research.att.com [135.207.26.26]) by mail-blue.research.att.com (Postfix) with ESMTP id 7F08F4CE0F; Thu, 6 Dec 2001 23:42:38 -0500 (EST) Received: from windsor.research.att.com (windsor.research.att.com [135.207.26.46]) by alliance.research.att.com (8.8.7/8.8.7) with ESMTP id XAA03937; Thu, 6 Dec 2001 23:42:37 -0500 (EST) From: Bill Fenner Received: (from fenner@localhost) by windsor.research.att.com (8.8.8+Sun/8.8.5) id UAA08096; Thu, 6 Dec 2001 20:42:37 -0800 (PST) Message-Id: <200112070442.UAA08096@windsor.research.att.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=19701020; charset=US-ASCII To: freebsd@hoolan.org Subject: Re: UDP checksum error after encapsulating multicast packet Cc: freebsd-hackers@freebsd.org Date: Thu, 6 Dec 2001 20:42:37 -0800 Versions: dmail (solaris) 2.2j/makemail 2.9b Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --19701020 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline I looked at the larger context and realized that ip_mloopback() was wrong too. Try this updated patch; it is a superset of the previous one. Bill --19701020 Content-Type: text/plain; name="ip_output.c.diff"; x-unix-mode=0644 Content-Disposition: attachment; filename="ip_output.c.diff" Index: ip_output.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/ip_output.c,v retrieving revision 1.143 diff -u -r1.143 ip_output.c --- ip_output.c 1 Dec 2001 13:48:16 -0000 1.143 +++ ip_output.c 7 Dec 2001 04:37:33 -0000 @@ -353,6 +363,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; @@ -1906,6 +2358,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); @@ -1946,12 +2409,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 } --19701020-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message