From: Florian Westphal <fw@strlen.de>
To: "Pekka Pietikäinen" <pp@ee.oulu.fi>
Cc: Florian Westphal <fw@strlen.de>,
Eric Dumazet <eric.dumazet@gmail.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
edumazet@google.com, netfilter-devel@vger.kernel.org
Subject: Re: netfilter: xt_socket: add XT_SOCKET_NOWILDCARD flag causes behavioural change in userspace?
Date: Thu, 24 Oct 2013 21:14:41 +0200 [thread overview]
Message-ID: <20131024191441.GD993@breakpoint.cc> (raw)
In-Reply-To: <52695011.2060902@ee.oulu.fi>
Pekka Pietikäinen <pp@ee.oulu.fi> wrote:
> On 24/10/13 16:29, Florian Westphal wrote:
[ restored nf-devel cc ]
> >I don't understand. The packet seen by xt_socket is arriving from
> >a remote machine, right?
> Virtual machine that's on virbr0 yep, and packet that used to match
> should be a synack to a connection initiated from the host.
Ah. Now the picture is clear. Underlying tun device in bridge,
which uses a socket internally (this is why skb->sk->sk_state is
TCP_CLOSE).
> bridge-nf-call-iptables = 0 and your patch + bridge-nf-call-iptable
> = 1 both made my test work with unmodified xt_socket (and adding
> debug prints shows sk_state is now sane)
>
> Oh. Adding some more debug prints it's the
> "inet_sk(sk)->inet_rcv_saddr == 0" part that triggered.
>
> Before 3.11 sk=nf_tproxy_get_sock_v4() was always done, so I suppose
> it was always working on sane data.
Yep. When called from bridge netfilter the skb is not orphaned
properly, so the tun sk is still around by the time xt_socket is
consulted.
Thanks for reporting!
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2013-10-24 19:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 13:33 netfilter: xt_socket: add XT_SOCKET_NOWILDCARD flag causes behavioural change in userspace? Pekka Pietikäinen
2013-10-24 8:28 ` Jari Turkia
2013-10-24 9:52 ` Pablo Neira Ayuso
2013-10-24 10:15 ` Eric Dumazet
2013-10-24 11:21 ` Pekka Pietikäinen
2013-10-24 12:05 ` Eric Dumazet
2013-10-24 12:27 ` Pekka Pietikäinen
2013-10-24 12:51 ` Florian Westphal
[not found] ` <52691D4F.4080903@ee.oulu.fi>
[not found] ` <20131024132936.GC993@breakpoint.cc>
[not found] ` <52695011.2060902@ee.oulu.fi>
2013-10-24 19:14 ` Florian Westphal [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=20131024191441.GD993@breakpoint.cc \
--to=fw@strlen.de \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=pp@ee.oulu.fi \
/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).