Date: Wed, 04 Oct 2017 08:01:09 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 222768] ipfw can't distinguish an inbound packets forwarded via if_bridge Message-ID: <bug-222768-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222768 Bug ID: 222768 Summary: ipfw can't distinguish an inbound packets forwarded via if_bridge Product: Base System Version: 11.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: alex@zagrebin.ru Created attachment 186898 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D186898&action= =3Dedit patch By default (when net.link.bridge.pfil_bridge=3D1), the packet, forwarded via if_bridge, has to be processed by ipfw 4 times. Suppose such configuration: em0 <-> bridge0 <-> em1 ipfw will process packet, forwarded from em0 to em1, in the following seque= nce: in[em0], in[bridge0], out[bridge0], out[em1]. We can expect, that inbound packets can be matched with the following ipfw = rule options: in[em0] - 'in recv em0' or 'in via em0' in[bridge0] - 'in via bridge0' For example, ipfw add 1 count ip from any to any in via em0 ipfw add 2 count ip from any to any in via bridge0 but this doesn't work as expected: each single packet matches 2 times to the rule 1 and not matches to the rule 2 at all. The reason in the following: despite that if_bridge sends information about corresponding interface to the pfil_run_hooks(), the ipfw doesn't uses it w= hile processing inbound packets. The attached patch fixes issue: If the interface on which ipfw processes packet does not match an 'received' interface, then this interface saved and used later in the processing of 'v= ia' rule option. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222768-8>