netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: netfilter-devel@vger.kernel.org, linux-netdev@vger.kernel.org
Subject: xt_physdev has no effect if net.bridge.bridge-nf-call-iptables=0
Date: Tue, 03 Jan 2012 02:29:43 +0100	[thread overview]
Message-ID: <4F025A07.2000304@nod.at> (raw)

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

Hi!

If net.bridge.bridge-nf-call-iptables is set to zero (which is the
default setting in Fedroa and RHEL6) xt_physdev has no effect.

A rule like this one will never match:
iptables -t nat -A PREROUTING -i bridge0 -m physdev --physdev-in eth0 -p
tcp --dport 80 -j DNAT --to-destination :8080

IMHO the cause of the problem is in net/bridge/br_netfilter.c,
br_nf_pre_routing() returns NF_ACCEPT before skb->nf_bridge is allocated
and skb->nf_bridge->physindev set to skb->dev.

Thanks,
//richard


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

             reply	other threads:[~2012-01-03  1:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03  1:29 Richard Weinberger [this message]
2012-01-03 13:26 ` xt_physdev has no effect if net.bridge.bridge-nf-call-iptables=0 Richard Weinberger
2012-01-03 13:26   ` [PATCH] netfilter: Fix br_nf_pre_routing() in conjunction with bridge-nf-call-ip(6)tables=0 Richard Weinberger
2012-01-03 16:15     ` Stephen Hemminger
2012-01-03 17:42       ` Richard Weinberger
2012-01-03 20:15         ` Bart De Schuymer
2012-01-03 20:29           ` Richard Weinberger
2012-01-04 17:55             ` Bart De Schuymer
2012-01-04 23:13               ` Richard Weinberger
2012-01-05 19:50                 ` Bart De Schuymer
2012-01-05 19:54                   ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F025A07.2000304@nod.at \
    --to=richard@nod.at \
    --cc=linux-netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).