Loading include/linux/netfilter.h +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ struct nf_logger { /* Function to register/unregister log function. */ int nf_log_register(int pf, struct nf_logger *logger); void nf_log_unregister_pf(int pf); int nf_log_unregister_pf(int pf); void nf_log_unregister_logger(struct nf_logger *logger); /* Calls the registered backend logging function */ Loading net/netfilter/nf_log.c +9 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,9 @@ int nf_log_register(int pf, struct nf_logger *logger) { int ret = -EBUSY; if (pf >= NPROTO) return -EINVAL; /* Any setup of logging members must be done before * substituting pointer. */ spin_lock(&nf_log_lock); Loading @@ -38,14 +41,19 @@ int nf_log_register(int pf, struct nf_logger *logger) } EXPORT_SYMBOL(nf_log_register); void nf_log_unregister_pf(int pf) int nf_log_unregister_pf(int pf) { if (pf >= NPROTO) return -EINVAL; spin_lock(&nf_log_lock); nf_logging[pf] = NULL; spin_unlock(&nf_log_lock); /* Give time to concurrent readers. */ synchronize_net(); return 0; } EXPORT_SYMBOL(nf_log_unregister_pf); Loading Loading
include/linux/netfilter.h +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ struct nf_logger { /* Function to register/unregister log function. */ int nf_log_register(int pf, struct nf_logger *logger); void nf_log_unregister_pf(int pf); int nf_log_unregister_pf(int pf); void nf_log_unregister_logger(struct nf_logger *logger); /* Calls the registered backend logging function */ Loading
net/netfilter/nf_log.c +9 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,9 @@ int nf_log_register(int pf, struct nf_logger *logger) { int ret = -EBUSY; if (pf >= NPROTO) return -EINVAL; /* Any setup of logging members must be done before * substituting pointer. */ spin_lock(&nf_log_lock); Loading @@ -38,14 +41,19 @@ int nf_log_register(int pf, struct nf_logger *logger) } EXPORT_SYMBOL(nf_log_register); void nf_log_unregister_pf(int pf) int nf_log_unregister_pf(int pf) { if (pf >= NPROTO) return -EINVAL; spin_lock(&nf_log_lock); nf_logging[pf] = NULL; spin_unlock(&nf_log_lock); /* Give time to concurrent readers. */ synchronize_net(); return 0; } EXPORT_SYMBOL(nf_log_unregister_pf); Loading