All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf 1/2] netfilter: nfnetlink_hook: strip off module name from hookfn
@ 2021-08-02 22:15 Pablo Neira Ayuso
  2021-08-02 22:15 ` [PATCH nf 2/2] netfilter: nfnetlink_hook: missing chain family Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2021-08-02 22:15 UTC (permalink / raw)
  To: netfilter-devel; +Cc: fw

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/netfilter/nfnetlink_hook.c b/net/netfilter/nfnetlink_hook.c
index 50b4e3c9347a..5b1922f96c9e 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) {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-02 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 22:15 [PATCH nf 1/2] netfilter: nfnetlink_hook: strip off module name from hookfn Pablo Neira Ayuso
2021-08-02 22:15 ` [PATCH nf 2/2] netfilter: nfnetlink_hook: missing chain family Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.