From: Daniel Mack <daniel@zonque.org>
To: Florian Westphal <fw@strlen.de>
Cc: Daniel Borkmann <dborkman@redhat.com>,
Alexey Perevalov <a.perevalov@samsung.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
netdev <netdev@vger.kernel.org>
Subject: Re: cgroup matches in INPUT chain
Date: Fri, 20 Mar 2015 14:57:39 +0100 [thread overview]
Message-ID: <550C2753.9020608@zonque.org> (raw)
In-Reply-To: <20150319185807.GA3845@breakpoint.cc>
Hi,
On 03/19/2015 07:58 PM, Florian Westphal wrote:
> Daniel Mack <daniel@zonque.org> wrote:
>> In my tests, however, NF_INET_LOCAL_IN is iterated before early_demux()
>> is called,
>
> Early demux occurs after PRE_ROUTING but before LOCAL_IN.
Hmm, you're right, except it isn't in my case. I'm not familiar with
that code, so please bear with me :)
In my simple test setup, when skbs are dequeued by process_backlog(),
they have skb->_skb_refdst set, and hence ip_rcv_finish() does not call
into early_demux() prior to iterating the INPUT chain:
ip_rcv_finish()
if (sysctl_ip_early_demux && !skb_dst(skb) && skb->sk == NULL)
...
ipprot->early_demux(skb);
...
Therefore, cgroup_mt() in xt_cgroup.c will be called with skb->sk ==
NULL, which makes the match callback ineffective. From looking at the
code, I assume xt_owner has the same problem.
However, when the skb is processed directly from the NIC's interrupt
handler, early_demux() is called as expected, and the match succeeds.
Any pointers how this can be solved would be greatly appreciated.
Thanks,
Daniel
next prev parent reply other threads:[~2015-03-20 13:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 18:41 cgroup matches in INPUT chain Daniel Mack
2015-03-19 18:58 ` Florian Westphal
2015-03-20 13:57 ` Daniel Mack [this message]
2015-03-20 16:11 ` Florian Westphal
2015-03-20 16:21 ` Daniel Mack
2015-03-20 20:18 ` Daniel Borkmann
2015-03-20 20:55 ` Cong Wang
2015-03-20 22:07 ` Daniel Mack
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=550C2753.9020608@zonque.org \
--to=daniel@zonque.org \
--cc=a.perevalov@samsung.com \
--cc=dborkman@redhat.com \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.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.