From owner-freebsd-bugs Wed Oct 23 11:10: 4 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AAB637B401 for ; Wed, 23 Oct 2002 11:10:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DF7D43E77 for ; Wed, 23 Oct 2002 11:10:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9NIA2x3037644 for ; Wed, 23 Oct 2002 11:10:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9NIA20J037643; Wed, 23 Oct 2002 11:10:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29FA237B401 for ; Wed, 23 Oct 2002 11:03:22 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8E8943E6E for ; Wed, 23 Oct 2002 11:03:21 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9NI3L7R088115 for ; Wed, 23 Oct 2002 11:03:21 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.6/8.12.6/Submit) id g9NI3LDs088114; Wed, 23 Oct 2002 11:03:21 -0700 (PDT) Message-Id: <200210231803.g9NI3LDs088114@www.freebsd.org> Date: Wed, 23 Oct 2002 11:03:21 -0700 (PDT) From: Andriy Gapon To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/44417: ipfw layer2 rules are not checked for ether_output_frame() on bridged interface Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 44417 >Category: kern >Synopsis: ipfw layer2 rules are not checked for ether_output_frame() on bridged interface >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 23 11:10:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Andriy Gapon >Release: 4.7-RELEASE >Organization: >Environment: FreeBSD terminus.foundation.invalid 4.7-RELEASE FreeBSD 4.7-RELEASE #3: Fri Oct 18 16:09:53 EDT 2002 avg@edge.foundation.invalid:/sys-devel/obj/sys-devel/src/sys/TERMINUS.bridge i386 >Description: with both net.link.ether.ipfw=1 and net.link.ether.bridge_ipfw=1 packets transmitted via an interface that is a part of a bridge cluster are not checked against ipfw rules in either ether_output_frame() or bdg_forward(). This means that traffic originating from a bridging host or routed from non-bridged interface will not be checked agains layer2-specific ipfw rules. this problem is only specific IPFW2, because with IPFW1 you can set layer2 rules anyway. >How-To-Repeat: on a bridinging host with IPFW2, Actions: 1. sysctl net.link.ether.ipfw=1 2. sysctl net.link.ether.bridge_ipfw=1 3. ipfw add 1 allow mac any 4. ping H Result: rule 1 will not have any matches >Fix: it's very tempting to suggest to remove check for src != NULL at sys/net/bridge.c:860, but not being an expert in the network code, I am not sure about possible interdependencies/side-effects. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message