From owner-freebsd-net@FreeBSD.ORG Wed Apr 30 02:03:00 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E48837B401; Wed, 30 Apr 2003 02:03:00 -0700 (PDT) Received: from mx.nsu.ru (mx.nsu.ru [212.192.164.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECC2943F93; Wed, 30 Apr 2003 02:02:57 -0700 (PDT) (envelope-from fjoe@iclub.nsu.ru) Received: from mail by mx.nsu.ru with drweb-scanned (Exim 3.36 #1 (Debian)) id 19AnWN-0006eS-00; Wed, 30 Apr 2003 16:04:59 +0700 Received: from iclub.nsu.ru ([193.124.215.97] ident=root) by mx.nsu.ru with esmtp (Exim 3.36 #1 (Debian)) id 19AnW3-0006Jx-00; Wed, 30 Apr 2003 16:04:39 +0700 Received: from iclub.nsu.ru (fjoe@localhost [127.0.0.1]) by iclub.nsu.ru (8.12.9/8.12.9) with ESMTP id h3U92Oud042014; Wed, 30 Apr 2003 16:02:24 +0700 (NSS) (envelope-from fjoe@iclub.nsu.ru) Received: (from fjoe@localhost) by iclub.nsu.ru (8.12.9/8.12.9/Submit) id h3U92Nf1042008; Wed, 30 Apr 2003 16:02:23 +0700 (NSS) Date: Wed, 30 Apr 2003 16:02:23 +0700 From: Max Khon To: Luigi Rizzo Message-ID: <20030430160222.A41678@iclub.nsu.ru> References: <20030430023640.A22257@iclub.nsu.ru> <20030429200529.GA71528@sunbay.com> <20030430143114.A38982@iclub.nsu.ru> <20030430004245.B95389@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20030430004245.B95389@xorpc.icir.org>; from rizzo@icir.org on Wed, Apr 30, 2003 at 12:42:45AM -0700 X-Envelope-To: rizzo@icir.org, ru@freebsd.org, freebsd-net@freebsd.org X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.11.1.4 X-Spam-Status: No, hits=-34.6 required=5.0 tests=BOGOFILTER_TEST_PASS,EMAIL_ATTRIBUTION,IN_REP_TO, QUOTED_EMAIL_TEXT,QUOTE_TWICE_1,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: freebsd-net@freebsd.org Subject: Re: IPDIVERT X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2003 09:03:01 -0000 hi, there! On Wed, Apr 30, 2003 at 12:42:45AM -0700, Luigi Rizzo wrote: > > > > I have a suggestion to build GENERIC and ipfw.ko with IPDIVERT by default > > > > or change IPDIVERT to NOIPDIVERT and build boot kernels with NOIPDIVERT. > > > > The main goal is to allow to use NAT with stock kernels and ipfw.ko. > ... > > AFAIK there is no possibility to add IPPROTO_DIVERT dynamically to > > inetsw[]. Some fields of 'struct ipq' are under #ifdef IPDIVERT as well. > > ipfw code under #ifdef IPDIVERT are just `case' labels and strings in printf's > > (like "ipdivert enabled"). In other words is it really > > worth splitting ipdivert into separate .ko module? Changing IPDIVERT to > > NOIPDIVERT will be cleaner in my opinion. > > indeed, i believe we should make the main part of IPDIVERT processing > (in ip_input.c, ip_output.c, ip_fw2.c and ip_var.h) non-optional > (this would also allow a better realignment of fields in struct ipq) > and only make the code in ip_divert.c a module ok, how can I add IPPROTO_DIVERT dynamically? Is it ok to have dummy usrreqs there and to overwrite IPPROTO_DIVERT array element upon module load/unload? /fjoe