]> git.ipfire.org Git - thirdparty/iptables.git/commit
iptables: restore NOTRACK functionality, target aliasing
authorJan Engelhardt <jengelh@inai.de>
Sun, 7 Oct 2012 14:32:36 +0000 (14:32 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Oct 2012 07:53:20 +0000 (09:53 +0200)
commitdd43527cb6bdf3d469100850ca10dcd2fb761304
tree058cdc61c36f467105b432dc67e786a1c96b22fb
parent4bdc1edf49dedd20519f2eaea95466400f627dd5
iptables: restore NOTRACK functionality, target aliasing

Commit v1.4.16-1-g2aaa7ec is testing for real_name (not) being NULL
which was always false (true). real_name was never NULL, so cs->jumpto
would always be used, which rendered -j NOTRACK unusable, since the
chosen real name.revision is for example NOTRACK.1, which does not exist
at the kernel side.

# ./iptables/xtables-multi main4 -t raw -A foo -j NOTRACK
dbg: Using NOTRACK.1
WARNING: The NOTRACK target is obsolete. Use CT instead.
iptables: Protocol wrong type for socket.

To reasonably support the extra-special verdict names, make it so that
real_name remains NULL when an extension defined no alias, which we can
then use to determine whether the user entered an alias name (which
needs to be followed) or not.

[ I have mangled this patch to remove a comment unnecessarily large.
  BTW, this patch gets this very close to the initial target aliasing
  proposal --pablo ]

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/ip6tables.c
iptables/iptables.c
libxtables/xtables.c