From owner-freebsd-net Fri Oct 20 4:38:59 2000 Delivered-To: freebsd-net@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id C469537B479 for ; Fri, 20 Oct 2000 04:38:52 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.0/8.11.0) id e9KBcnE42557 for net@FreeBSD.org; Fri, 20 Oct 2000 14:38:49 +0300 (EEST) (envelope-from ru) Date: Fri, 20 Oct 2000 14:38:49 +0300 From: Ruslan Ermilov To: net@FreeBSD.org Subject: IP reassembly, options, checksum, and ICMP error generation Message-ID: <20001020143849.A42456@sunbay.com> Mail-Followup-To: net@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi! RFC 791 says we should copy the IP header from the first fragment of the datagram, and re-calcalate the `ip_len' when full reassembly is complete (see section 3.2, Fragmentation and Reassembly). It does mean that although the `ip_len' is changed, the rest of the header, including `ip_sum', is simply copied from the first fragment (FO==0). This affects ICMP error generation. In case where original (fragmented) datagram for this host could not be delivered, the embedded copy of part of the original datagram will have incorrect checksum, like in the case when original (not exactly fragmented) datagram contained IP options. The question is: should we recalculate the header checksum of the original datagram in icmp_error()? -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message