From owner-cvs-sys Mon May 25 07:00:29 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA21942 for cvs-sys-outgoing; Mon, 25 May 1998 07:00:29 -0700 (PDT) (envelope-from owner-cvs-sys) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id GAA21653; Mon, 25 May 1998 06:59:49 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id OAA20496; Mon, 25 May 1998 14:16:43 +0200 From: Luigi Rizzo Message-Id: <199805251216.OAA20496@labinfo.iet.unipi.it> Subject: Re: cvs commit: src/sys/conf options src/sys/netinet ip_divert.c To: julian@FreeBSD.ORG (Julian Elischer) Date: Mon, 25 May 1998 14:16:42 +0200 (MET DST) Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG In-Reply-To: <199805251037.DAA04693@freefall.freebsd.org> from "Julian Elischer" at May 25, 98 03:37:30 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > The new semantic (which is how we should have done it the first time) > is that the port number in the sendto() is the rule number AFTER which > processing should restart, and on a recvfrom(), the port number is the > rule number which caused the diversion. This is much more flexible, > and also more intuitive. If the user uses the same sockaddr received for sure it is more flexible, but to me it is not that intuitive to mix port and rule numbers. What about your original idea (that i implemented in dummynet) of adding a field to the m_pkthdr so that you can carry around a pointer to the matching rule and be able to do the right thing later on the packet ? (BTW the divert hack, i never fully understood if/how it works in case the processing for a diverted packet is suspended, or multiple copies of the packet are generated -- since there is only one state variable for this purpose). This is a problem in dummynet, but i wonder if it also has some interaction with TEE rules or multicast traffic. cheers luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________