From owner-freebsd-hackers Thu Dec 6 10:28:59 2001 Delivered-To: freebsd-hackers@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 93DC337B41A for ; Thu, 6 Dec 2001 10:28:56 -0800 (PST) Received: (from tinguely@localhost) by web.cs.ndsu.nodak.edu (8.11.4/8.11.4) id fB6IStX89640; Thu, 6 Dec 2001 12:28:55 -0600 (CST) (envelope-from tinguely) Date: Thu, 6 Dec 2001 12:28:55 -0600 (CST) From: mark tinguely Message-Id: <200112061828.fB6IStX89640@web.cs.ndsu.nodak.edu> To: freebsd@hoolan.org, tinguely@web.cs.ndsu.nodak.edu, tinguely@web.cs.ndsu.nodak.edu, tlambert2@mindspring.com Subject: Re: UDP checksum error after encapsulating multicast packet Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <200112061610.fB6GApo88433@web.cs.ndsu.nodak.edu> 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 the len and offset have been put in net order, but the len is then assumed to be in host order: in sys/netinet: --- ip_mroute.c.orig Thu Jul 19 01:37:26 2001 +++ ip_mroute.c Thu Dec 6 12:26:25 2001 @@ -1595,6 +1595,7 @@ */ ip = (struct ip *)((caddr_t)ip_copy + sizeof(multicast_encap_iphdr)); --ip->ip_ttl; + len = ip->ip_len; HTONS(ip->ip_len); HTONS(ip->ip_off); ip->ip_sum = 0; @@ -1605,7 +1606,7 @@ if (vifp->v_rate_limit == 0) tbf_send_packet(vifp, mb_copy); else - tbf_control(vifp, mb_copy, ip, ip_copy->ip_len); + tbf_control(vifp, mb_copy, ip, len); } /* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message