From owner-freebsd-net Thu Jun 25 15:59:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA16375 for freebsd-net-outgoing; Thu, 25 Jun 1998 15:59:30 -0700 (PDT) (envelope-from owner-freebsd-net@FreeBSD.ORG) Received: from alpha.xerox.com (omega.Xerox.COM [13.1.64.95]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id PAA15932; Thu, 25 Jun 1998 15:56:29 -0700 (PDT) (envelope-from fenner@parc.xerox.com) Received: from crevenia.parc.xerox.com ([13.2.116.11]) by alpha.xerox.com with SMTP id <40747(2)>; Thu, 25 Jun 1998 15:55:46 PDT Received: from localhost by crevenia.parc.xerox.com with SMTP id <177515>; Thu, 25 Jun 1998 15:55:35 -0700 To: Nate Lawson cc: fenner@parc.xerox.com (Bill Fenner), nate@elite.net, julian@whistle.com, freebsd-bugs@FreeBSD.ORG, freebsd-net@FreeBSD.ORG Subject: Re: Apparent bug in sendto() with raw sockets In-reply-to: Your message of "Thu, 25 Jun 98 15:20:43 PDT." <199806252220.PAA28609@almond.elite.net> Date: Thu, 25 Jun 1998 15:55:31 PDT From: Bill Fenner Message-Id: <98Jun25.155535pdt.177515@crevenia.parc.xerox.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message <199806252220.PAA28609@almond.elite.net> you write: >I know that 2.0.5R behaved the way that OpenBSD and Linux behave. Were there >any complaints or problems with it back then? It didn't. The code in FreeBSD is almost exactly the same as when IP_HDRINCL was introduced in 4.3-Reno. The change that caused more recent versions of FreeBSD to return EINVAL was that it started checking the validity of the length field and returns EINVAL if the IP length is longer than the length of the buffer that was provided. I had tossed around the idea of a socket option to switch behaviors, for both input and output, but decided it would be relatively wasted effort; if you can conditionally set a socket option you can also conditionally (fail to) byte-swap the appropriate fields. Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message