From: Pablo Neira Ayuso Date: Mon, 2 Aug 2021 22:15:53 +0000 (+0200) Subject: netfilter: nfnetlink_hook: strip off module name from hookfn X-Git-Tag: v5.14-rc6~21^2~39^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61e0c2bc555a194ada2632fadac73f2bdb5df9cb;p=thirdparty%2Fkernel%2Flinux.git netfilter: nfnetlink_hook: strip off module name from hookfn 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 --- diff --git a/net/netfilter/nfnetlink_hook.c b/net/netfilter/nfnetlink_hook.c index 202f57d17bab8..ca453c61dbdfc 100644 --- a/net/netfilter/nfnetlink_hook.c +++ b/net/netfilter/nfnetlink_hook.c @@ -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) {