From owner-freebsd-arch Fri Oct 25 17:20:12 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E184F37B401 for ; Fri, 25 Oct 2002 17:20:10 -0700 (PDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6640743E6E for ; Fri, 25 Oct 2002 17:20:10 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021026002010.PSBZ13658.rwcrmhc52.attbi.com@InterJet.elischer.org>; Sat, 26 Oct 2002 00:20:10 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id RAA08785; Fri, 25 Oct 2002 17:18:10 -0700 (PDT) Date: Fri, 25 Oct 2002 17:18:09 -0700 (PDT) From: Julian Elischer To: Bill Fenner Cc: arch@freebsd.org Subject: Re: Renumbering IPPROTO_DIVERT In-Reply-To: <200210252327.g9PNRtUw001126@stash.attlabs.att.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG hmmm seems fair.. I think though that there should be a "compat" shim that does the right thing but is VERY NOISY. On Fri, 25 Oct 2002, Bill Fenner wrote: > I'd like to move IPPROTO_DIVERT out of the legitimate space of IP protocol > numbers. Here's the patch: > > Index: in.h > =================================================================== > RCS file: /home/ncvs/src/sys/netinet/in.h,v > retrieving revision 1.72 > diff -u -r1.72 in.h > --- in.h 21 Oct 2002 20:40:02 -0000 1.72 > +++ in.h 25 Oct 2002 21:13:20 -0000 > @@ -236,12 +236,12 @@ > #define IPPROTO_PIM 103 /* Protocol Independent Mcast */ > #define IPPROTO_PGM 113 /* PGM */ > /* 255: Reserved */ > -/* BSD Private, local use, namespace incursion */ > -#define IPPROTO_DIVERT 254 /* divert pseudo-protocol */ > #define IPPROTO_MAX 256 > > /* last return value of *_input(), meaning "all job for this pkt is done". */ > #define IPPROTO_DONE 257 > + > +#define IPPROTO_DIVERT 258 /* divert pseudo-protocol */ > > /* > * Local port number conventions: > > > Yup, it Just Works. Even better, with a patch to raw_ip.c, divert-using > applications can now get an error from their socket() call when DIVERT > isn't compiled in, as opposed to the current behavior where socket() > would succeed but provide the normal raw IP semantics. > > Now, the backwards compatability question: applications using the > old DIVERT interface will now start getting real raw IP sockets > with protocol 254. This will generally cause silent failures, or > possibly unexpected behavior (just like if DIVERT wasn't compiled > into the kernel). Should there be e.g. a kernel printf when an > application uses the old divert number, warning that an application > is using the old divert interface and needs to be recompiled? Or > is it OK to fail silently, as there are few DIVERT consumers and > it's the same failure mode as if DIVERT isn't present in the kernel? > > Bill > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message