Skip to contentSkip to conversation

netfilter: Make nflog quiet when no one listen in userspace.

PATCH Eric Leblond 2 participants 2 messages Jun 8, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The message "nf_log_packet: can't log since no backend logging module loaded in! Please either load one, or disable logging explicitly" was displayed for each logged packet when no userspace application is listening to nflog events. The message seems to warn for a problem with a kernel module missing but as said before this is not the case. I thus propose to suppress the message (I don't see any reason to flood the log because a user application has crashed.)

---
 net/netfilter/nf_log.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
net/netfilter/nf_log.c +0 -4
index bc11d70..9fda6ee 100644
@@ -92,10 +92,6 @@ void nf_log_packet(int pf,
 		vsnprintf(prefix, sizeof(prefix), fmt, args);
 		va_end(args);
 		logger->logfn(pf, hooknum, skb, in, out, loginfo, prefix);
-	} else if (net_ratelimit()) {
-		printk(KERN_WARNING "nf_log_packet: can\'t log since "
-		       "no backend logging module loaded in! Please either "
-		       "load one, or disable logging explicitly\n");
 	}
 	rcu_read_unlock();
 }
Signature · 1 line
1.5.4.3
#1 lore raw
Quoted 6 lines · Eric Leblond

The message "nf_log_packet: can't log since no backend logging module loaded in! Please either load one, or disable logging explicitly" was displayed for each logged packet when no userspace application is listening to nflog events. The message seems to warn for a problem with a kernel module missing but as said before this is not the case. I thus propose to suppress the message (I don't see any reason to flood the log because a user application has crashed.)

Yes, that message has annoyed me on multiple occasions as well. Applied, thanks Eric.