]> git.ipfire.org Git - thirdparty/iptables.git/commit
xt_socket: add --nowildcard flag
authorEric Dumazet <edumazet@google.com>
Thu, 20 Jun 2013 12:52:35 +0000 (05:52 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 6 Aug 2013 16:43:49 +0000 (18:43 +0200)
commit64d45792fe8f50294034bb699ff74ecae178e975
tree1fd8db59906709fcd8082e2fd59db7e96e2ea28d
parent8643adc8f0f0fe1e22ca0de0503eee0ee1e22bf5
xt_socket: add --nowildcard flag

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

The wildcard is the legacy socket match behavior, that ignores
LISTEN sockets bound to INADDR_ANY (or ipv6 equivalent)

iptables -I INPUT -p tcp --syn -j SYN_CHAIN
iptables -I INPUT -m socket -j ACCEPT

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_socket.c
include/linux/netfilter/xt_socket.h