All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Greg Scott <GregScott@InfraSupportEtc.com>
Cc: Jan Engelhardt <jengelh@computergmbh.de>,
	Netfilter Developer Mailing List
	<netfilter-devel@vger.kernel.org>
Subject: Re: Ebtables hook order anomaly
Date: Tue, 25 Mar 2008 14:49:59 +0100	[thread overview]
Message-ID: <47E90307.2060802@trash.net> (raw)
In-Reply-To: <925A849792280C4E80C5461017A4B8A226A01E@mail733.InfraSupportEtc.com>

Greg Scott wrote:
>> Indeed, on output bridge netfilter will run after IPv4 netfilter.
>> Does that explain things?
> 
> Well, not really.  2.6.23-2 behaves differently than 2.6.18.  My
> ebtables marks get set and read by iptables in 2.6.18.  iptables does
> not see them in 2.6.23.
> 
> It could be something in the order of execution changed.  I'm using
> RedHat kernels right now and I know they tweak the kernels a little bit.
> But surely the RedHat guys would not change something this fundamental?


No, that was us :) Bridge-netfilter used to defer the IPv4 OUTPUT
and POSTROUTING hook until the outgoing bridge port was determined
by the bridge code. This "feature" was removed because it broke
all kinds of things, now the order matches the layering and IPv4
hooks are always processed entirely before bridging.

> I set my ebtables mark for outbound packets in two places - in the
> OUTPUT chain and the FORWARD chain.  I was looking mostly at the
> ebtables FORWARD chain for packets that pass thru the box.  I set the
> mark in ebtables FORWARD and OUTPUT.  Iptables POSTROUTING needs to see
> them so it knows to MASQUERADE.  Otherwise, things get really weird.  :)
> iptables sees the marks in 2.6.18, but does not see them in 2.6.23.  
> 
> I have a couple of 2.6.23 systems here and I can brew up a 2.6.18 fc6
> system later on for testing if needed.  (All the 2.6.18 stuff I have
> built up right now is in production.)  I can set up some tests similarly
> to Jan's testing from last night for packets passing through the box.  
> 
> Or if there's a better way to do this, I'm open.  

For routed packets you can't make any decisions in iptables based
on the outgoing bridge port, thats only possible for purely bridged
traffic.

  reply	other threads:[~2008-03-25 13:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 13:32 Ebtables hook order anomaly Greg Scott
2008-03-25 13:49 ` Patrick McHardy [this message]
2008-03-25 15:22   ` Jan Engelhardt
2008-03-25 15:30     ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2008-03-30 21:21 Greg Scott
2008-03-27  7:55 Greg Scott
2008-03-25 17:02 Greg Scott
2008-03-26  7:16 ` Patrick McHardy
2008-03-25 14:17 Greg Scott
2008-03-25  1:18 ebtables and iptables different behavior between 2.6.18 on fc6 and 2.6.23 on fc8 Greg Scott
2008-03-25  2:28 ` Jan Engelhardt
2008-03-25  6:48   ` Ebtables hook order anomaly (was: ebtables and iptables different behavior between 2.6.18 on fc6 and 2.6.23 on fc8) Jan Engelhardt
2008-03-25 12:57     ` Ebtables hook order anomaly Patrick McHardy
2008-04-09 14:07       ` Jan Engelhardt
2008-04-09 14:36         ` Patrick McHardy
2008-04-09 14:54           ` Jan Engelhardt
2008-04-09 15:04             ` Patrick McHardy
2008-04-09 15:12               ` Greg Scott
2008-04-09 16:11               ` Jan Engelhardt
2008-04-09 16:18                 ` Greg Scott
2008-04-09 15:05             ` Greg Scott
2008-04-09 15:11               ` Patrick McHardy
2008-04-09 15:21                 ` Greg Scott
2008-04-09 15:23                   ` Patrick McHardy
2008-04-09 15:39                     ` Greg Scott

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=47E90307.2060802@trash.net \
    --to=kaber@trash.net \
    --cc=GregScott@InfraSupportEtc.com \
    --cc=jengelh@computergmbh.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.