From owner-freebsd-ipfw Mon Mar 6 9:57:32 2000 Delivered-To: freebsd-ipfw@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id 49E8D37BE72 for ; Mon, 6 Mar 2000 09:57:28 -0800 (PST) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id SAA57984; Mon, 6 Mar 2000 18:56:00 +0100 (CET) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200003061756.SAA57984@info.iet.unipi.it> Subject: Re: ipdivert and ethernet bridging In-Reply-To: <200003061715.SAA35436@lk.tempest.sk> from Ludo Koren at "Mar 6, 2000 06:15:06 pm" To: Ludo Koren Date: Mon, 6 Mar 2000 18:56:00 +0100 (CET) Cc: robert+freebsd@cyrus.watson.org, ipfw@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The patch follows. Comments are welcomed. I had a slightly different solution in mind. In my design, a match in a "divert" rule would make bdg_forward return a special code so that the packet would appear as destined for the local interface and passed to the upper layer (hence calling ip_input() etc.). While your approach is more compact i see some potential problems: 1) a packet destined to a local address probably ends up being duplicated, as it gets diverted once in bdg_forward(), and once again when it goes to ether_input() and up. Duplicates are discarded by TCP so things might work without problem except performance. 2) packets diverted like this bypass the ipintrq queue, which is probably not a problem at all but worth mentioning. cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) Mobile +39-347-0373137 -----------------------------------+------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message