aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-02-12 14:11:24 -0500
committerDavid S. Miller <davem@davemloft.net>2007-02-12 14:11:24 -0500
commit9dc6aa5fcfc104becd86c89c5e7ec90e840e0163 (patch)
tree4e6d22cd7fdcae42cbccd7ef71b86958ac5ac736
parenta5ea6169f294bc33a762f7c1c240e3ac0f045f9e (diff)
[NETFILTER]: nf_log: make nf_log_unregister_pf return void
Since the only user of nf_log_unregister_pf (nfnetlink_log) doesn't check the return value, change it to void and bail out silently when a non-existant address family is supplied. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/netfilter.h2
-rw-r--r--net/netfilter/nf_log.c7
2 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index d4c4c5120bc0..18a67908a330 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -172,7 +172,7 @@ struct nf_logger {
172 172
173/* Function to register/unregister log function. */ 173/* Function to register/unregister log function. */
174int nf_log_register(int pf, struct nf_logger *logger); 174int nf_log_register(int pf, struct nf_logger *logger);
175int nf_log_unregister_pf(int pf); 175void nf_log_unregister_pf(int pf);
176void nf_log_unregister_logger(struct nf_logger *logger); 176void nf_log_unregister_logger(struct nf_logger *logger);
177 177
178/* Calls the registered backend logging function */ 178/* Calls the registered backend logging function */
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index a3ff88dcc2ac..814bab700db6 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -40,19 +40,16 @@ int nf_log_register(int pf, struct nf_logger *logger)
40} 40}
41EXPORT_SYMBOL(nf_log_register); 41EXPORT_SYMBOL(nf_log_register);
42 42
43int nf_log_unregister_pf(int pf) 43void nf_log_unregister_pf(int pf)
44{ 44{
45 if (pf >= NPROTO) 45 if (pf >= NPROTO)
46 return -EINVAL; 46 return;
47
48 spin_lock(&nf_log_lock); 47 spin_lock(&nf_log_lock);
49 rcu_assign_pointer(nf_logging[pf], NULL); 48 rcu_assign_pointer(nf_logging[pf], NULL);
50 spin_unlock(&nf_log_lock); 49 spin_unlock(&nf_log_lock);
51 50
52 /* Give time to concurrent readers. */ 51 /* Give time to concurrent readers. */
53 synchronize_rcu(); 52 synchronize_rcu();
54
55 return 0;
56} 53}
57EXPORT_SYMBOL(nf_log_unregister_pf); 54EXPORT_SYMBOL(nf_log_unregister_pf);
58 55