From owner-freebsd-ipfw@FreeBSD.ORG Thu Mar 23 14:01:18 2006 Return-Path: X-Original-To: FreeBSD-ipfw@freebsd.org Delivered-To: FreeBSD-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF93616A400 for ; Thu, 23 Mar 2006 14:01:18 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF41943D46 for ; Thu, 23 Mar 2006 14:01:18 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id k2NE06Sl066749; Thu, 23 Mar 2006 06:00:06 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id k2NE06Xb066748; Thu, 23 Mar 2006 06:00:06 -0800 (PST) (envelope-from rizzo) Date: Thu, 23 Mar 2006 06:00:06 -0800 From: Luigi Rizzo To: Dmitry Pryanishnikov Message-ID: <20060323060006.A66681@xorpc.icir.org> References: <20060323133729.D63213@atlantis.atlantis.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20060323133729.D63213@atlantis.atlantis.dp.ua>; from dmitry@atlantis.dp.ua on Thu, Mar 23, 2006 at 02:03:20PM +0200 Cc: FreeBSD-ipfw@freebsd.org Subject: Re: IPFW1->2 regression: "in/out/via any" ignored X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Mar 2006 14:01:19 -0000 On Thu, Mar 23, 2006 at 02:03:20PM +0200, Dmitry Pryanishnikov wrote: > > Hello! > > I've found a serious regression during the IPFW1->2 transition. I'm using > "recv any" construction to match transit packets only. Manpage ipfw(8) clearly > says: > > recv | xmit | via {ifX | if* | ipno | any} > Matches packets received, transmitted or going through, respec- > tively, the interface specified by exact name (ifX), by device > name (if*), by IP address, or through some interface. > ...........................................^^^^^^^^^^^^^^^^^^^^^^ > > A packet may not have a receive or transmit interface: packets > originating from the local host have no receive interface, while > packets destined for the local host have no transmit interface. The second part of this paragraph is surely incorrect - there is no transmit interface for packets in the inbound path (i.e. while they are in ip_input()) whether or not they are destined locally. So 'xmit any' does not make any sense. For locally generated packets i admit 'recv any' may be of some use, and this is unsupported. There are probably workaround such as 'src-ip me' which may be of some help here although this particular instruction can be expensive as it has to scan the list of local addresses. cheers luigi