All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH V2 1/2] netfilter: rpfilter: skip locally generated bcast, too
Date: Fri, 19 Apr 2013 00:11:30 +0200	[thread overview]
Message-ID: <20130418221130.GA6429@localhost> (raw)
In-Reply-To: <1366274725-16286-1-git-send-email-fw@strlen.de>

Hi Florian,

On Thu, Apr 18, 2013 at 10:45:24AM +0200, Florian Westphal wrote:
> Alex Efros reported rpfilter module doesn't match following packets:
> IN=br.qemu SRC=192.168.2.1 DST=192.168.2.255 [ .. ]
> (netfilter bugzilla #814).
> 
> Problem is that network stack arranges for the locally generated broadcasts
> to appear on the interface they were sent out, so the IFF_LOOPBACK check
> doesn't trigger.
> 
> As -m rpfilter is restricted to PREROUTING, we can check for existing
> rtable instead, it catches locally-generated broad/multicast case, too.
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
>  Pablo,
> 
>  I did have a look at nf_conntrack_broadcast, but
>  1. I cannot check skb->sk (TPROXY can set that for incoming packets)
>  2. I don't want to test conntrack info to avoid dependency on conntrack
> 
>  So, this is pretty much the very same patch as V1, except that this
>  also checks for _LOCAL flag instead of just checking for presence of
>  skb_dst().
> 
>  Is this ok, or did you have something else in mind?

That's fine. I just wanted a bit further validation to avoid an easy
breakage in case this assumption is not fulfilled anymore.

I have made a comestic change: renamed is_local to rpfilter_is_local
just to stick to the corresponding function namespace.

Applied, thanks.

      parent reply	other threads:[~2013-04-18 22:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18  8:45 [PATCH V2 1/2] netfilter: rpfilter: skip locally generated bcast, too Florian Westphal
2013-04-18  8:45 ` [PATCH 2/2] netfilter: rpfilter: depend on raw or mangle table Florian Westphal
2013-04-18 22:17   ` Pablo Neira Ayuso
2013-04-18 22:11 ` Pablo Neira Ayuso [this message]

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=20130418221130.GA6429@localhost \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.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.