Skip to contentSkip to conversation

Fix debug_proto_ctx()

PATCH Applied Phil Sutter 2 participants 2 messages Aug 24, 2017 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 Fix debug_proto_ctx()

Debug mask check was done against wrong flag, causing protocol context debug output being printed when only --debug=netlink was given.

Fixes be441e1ffdc24 ("src: add debugging mask to context structure")

---
This led to almost all testcases in tests/py to fail due to differing output when checking netlink messages. Pablo, did you just forget to run the testsuite, or is there a bug in your environment somewhere so this could slip through?

---
 src/proto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/proto.c +1 -1
index 5bd50b7b96195..a72c10c3a1680 100644
@@ -143,7 +143,7 @@ static void proto_ctx_debug(const struct proto_ctx *ctx, enum proto_bases base,
 {
 	unsigned int i;
 
-	if (!(debug_mask & DEBUG_NETLINK))
+	if (!(debug_mask & DEBUG_PROTO_CTX))
 		return;
 
 	pr_debug("update %s protocol context:\n", proto_base_names[base]);
Signature · 1 line
2.13.1
maintainer Applied
#1 lore raw
Quoted 2 lines · Phil Sutter

Debug mask check was done against wrong flag, causing protocol context debug output being printed when only --debug=netlink was given.

Applied.