Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jesper Dangaard Brouer <jbrouer@redhat.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	netdev <netdev@vger.kernel.org>,
	netfilter-devel@vger.kernel.org,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Patrick McHardy <kaber@trash.net>
Subject: Re: [PATCH nf-next] netfilter: xt_socket: add XT_SOCKET_NOWILDCARD flag
Date: Tue, 04 Jun 2013 06:46:57 -0700	[thread overview]
Message-ID: <1370353617.24311.201.camel@edumazet-glaptop> (raw)
In-Reply-To: <20130604111014.73c718f7@redhat.com>

On Tue, 2013-06-04 at 11:10 +0200, Jesper Dangaard Brouer wrote:
> On Mon, 03 Jun 2013 15:57:29 -0700
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
> 
> > From: Eric Dumazet <edumazet@google.com>
> > 
> > xt_socket module can be a nice replacement to conntrack module
> > in some cases (SYN filtering for example)
> > 
> > But it lacks the ability to match the 3rd packet of TCP
> > handshake (ACK coming from the client).
> > 
> > Add a XT_SOCKET_NOWILDCARD flag to disable the wildcard mechanism
> 
> Sorry, but I'm not sure I understand your description.
> 
> What is the effect of adding the XT_SOCKET_NOWILDCARD flag?
> It almost sound like it adds the ability to match the 3rd packet of TCP
> handshake (ACK coming from the client), is that the case?
> 

Well, if the found socket happens to be a LISTEN socket, we ignore the
socket if it was bound to 0.0.0.0

Thats the wildcard thing in xt_socket. Not clear why its there, but
thing is : we apparently have to keep this behavior by default.

So yes, the ACK packet from the client is not matched by current
xt_socket.

After my patch, it is matched.

I CCed you because you mentioned using conntrack for SYN filtering :
xt_socket can be a way to do the same thing without the conntrack
overhead, for locally terminated traffic.




  reply	other threads:[~2013-06-04 13:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 22:57 [PATCH nf-next] netfilter: xt_socket: add XT_SOCKET_NOWILDCARD flag Eric Dumazet
2013-06-04  9:10 ` Jesper Dangaard Brouer
2013-06-04 13:46   ` Eric Dumazet [this message]
2013-06-04 14:30     ` Jesper Dangaard Brouer
2013-06-20  8:38 ` Eric Dumazet
2013-06-20  9:55   ` Pablo Neira Ayuso
2013-06-20 10:19     ` Eric Dumazet
2013-06-20 12:52 ` [PATCH v2 " Eric Dumazet
2013-06-25  0:57   ` Pablo Neira Ayuso
2013-06-20 12:52 ` [PATCH iptables] xt_socket: add --nowildcard flag Eric Dumazet
2013-06-25  0:58   ` Pablo Neira Ayuso

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=1370353617.24311.201.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=brouer@redhat.com \
    --cc=jbrouer@redhat.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox