Skip to content
Commit 7181ebaf authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: fix possible removal of wrong hook



nf_unregister_net_hook() uses the nf_hook_ops fields as tuple to look up for
the corresponding hook in the list. However, we may have two hooks with exactly
the same configuration.

This shouldn't be a problem for nftables since every new chain has an unique
priv field set, but this may still cause us problems in the future, so better
address this problem now by keeping a reference to the original nf_hook_ops
structure to make sure we delete the right hook from nf_unregister_net_hook().

Fixes: 085db2c0 ("netfilter: Per network namespace netfilter hooks.")
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Acked-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 2385eb0c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment