]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
netfilter: nfnetlink_hook: strip off module name from hookfn
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 2 Aug 2021 22:15:53 +0000 (00:15 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 6 Aug 2021 15:07:40 +0000 (17:07 +0200)
NFNLA_HOOK_FUNCTION_NAME should include the hook function name only,
the module name is already provided by NFNLA_HOOK_MODULE_NAME.

Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink_hook.c

index 202f57d17bab8474aea378a3955a76a29796874f..ca453c61dbdfcb90e9b994713455b029109309b2 100644 (file)
@@ -135,6 +135,7 @@ static int nfnl_hook_dump_one(struct sk_buff *nlskb,
        if (module_name) {
                char *end;
 
+               *module_name = '\0';
                module_name += 2;
                end = strchr(module_name, ']');
                if (end) {