Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9e0b47af authored by Eric Dumazet's avatar Eric Dumazet Committed by Gerrit - the friendly Code Review server
Browse files

netfilter: xt_socket: add XT_SOCKET_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 --nowildcard -j ACCEPT

Change-Id: I5216b9c9b367cb1adbe74d47014a4155f6c39271
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Git-commit: 681f130f39e10087475383e6771b9366e26bab0c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[harouth@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: default avatarHarout Hedeshian <harouth@codeaurora.org>
parent 53ea1fd7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment