nf_log: Add stackable loggers support
Subsystems (2)
PATCH 1/1 nf_log: Add stackable loggers support
Hello,
Here's a patch that will add support for stackable loggers to nf_log.c
Sorry for not RTFM the FAQ on how to submit patches in the first place.
cu
Gregor
=================================================================
[PATCH] nf_log: Add support for stackable loggers
More than one logger can be registered per PF. Registered loggers are stored in a list. nf_log_unregister_pf needs the logger to unregister as second parameter. nf_log_register still return -EEXIST if the logger is already registered.
To be able to register a logger to more than one PF a container struct nf_logging_node is used as nodes in the list.
The /proc interface will display all registered logger seperated by spaces
include/linux/netfilter.h +1 -1
@@ -157,7 +157,7 @@/* Function to register/unregister log function. */ int nf_log_register (int pf,struct nf_logger *logger); -int nf_log_unregister_pf (int pf); +int nf_log_unregister_pf (int pf,struct nf_logger *logger);void nf_log_unregister_logger (struct nf_logger *logger);/* Calls the registered backend logging function */
net/netfilter/nf_log.c +72 -30
179 lines not on this page · raw message
net/netfilter/nfnetlink_log.c +1 -1
@@ -808,7 +808,7 @@UDEBUG ("unregistering log handler for pf=%u\n" , pf);/* This is a bug and a feature. We cannot unregister * other handlers, like nfnetlink_inst can */ -nf_log_unregister_pf (pf); +nf_log_unregister_pf (pf, &nfulnl_logger);break ;default : ret = -EINVAL ;