From owner-cvs-sys Wed Oct 23 23:18:58 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA18848 for cvs-sys-outgoing; Wed, 23 Oct 1996 23:18:58 -0700 (PDT) Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id XAA18823; Wed, 23 Oct 1996 23:18:46 -0700 (PDT) Received: from crevenia.parc.xerox.com ([13.2.116.11]) by alpha.xerox.com with SMTP id <16919(1)>; Wed, 23 Oct 1996 23:18:14 PDT Received: from localhost by crevenia.parc.xerox.com with SMTP id <177480>; Wed, 23 Oct 1996 23:18:08 -0700 To: Paul Traina cc: Garrett Wollman , CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/netinet ip.h ip_var.h In-reply-to: Your message of "Wed, 23 Oct 96 17:53:15 PDT." <199610240053.RAA28472@precipice.shockwave.com> Date: Wed, 23 Oct 1996 23:18:07 PDT From: Bill Fenner Message-Id: <96Oct23.231808pdt.177480@crevenia.parc.xerox.com> Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In message <199610240053.RAA28472@precipice.shockwave.com> you write: >Urp... I think I recall seeing a note somewhere explaining why they weren't >unsigned... something to do with some mbuf math somewhere. ...? talks about pragmatically making them signed so that unsigned math doesn't fail in strange ways. Having them signed actually appears to be a big chunk of why FreeBSD isn't vulnerable to the Win95 ping evilness (which gets ICMP to reflect a too-big packet & dies on output). I think that sign-extension makes the check to see if the packet will fit on the ifq fail since the packet appears huge (division by the unsigned if_mtu causes the negative ip_len to be coerced to unsigned). I'm not sure I'm convinced that gcc will warn us about every weirdness that arises from this change. I suspect that there's plenty of sloppy code that assumes these are signed and needs to be checked. Bill