diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2005-01-03 04:18:05 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-03 04:18:05 -0800 |
commit | 5ea39dfbe98e3d25f613c2edf6038e386b81fc1c (patch) | |
tree | 49b9ad65bcd4f68d68af33cdcd1d0b0808bd1042 /net | |
parent | a9dcd00ecfdf71463dc5347567c15dbda6674ff7 (diff) | |
download | history-5ea39dfbe98e3d25f613c2edf6038e386b81fc1c.tar.gz |
[PATCH] netfilter: Fix ip_conntrack_proto_sctp exit on sysctl fail
On failure from register_sysctl_table, we return with exit 0. Oops. init and
fini should also be static. nfsim found these.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_proto_sctp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c index 0cefc6f7899403..aa49bea4aa5603 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c @@ -609,7 +609,7 @@ static ctl_table ip_ct_net_table[] = { static struct ctl_table_header *ip_ct_sysctl_header; #endif -int __init init(void) +static int __init init(void) { int ret; @@ -622,6 +622,7 @@ int __init init(void) #ifdef CONFIG_SYSCTL ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table, 0); if (ip_ct_sysctl_header == NULL) { + ret = -ENOMEM; printk("ip_conntrack_proto_sctp: can't register to sysctl.\n"); goto cleanup; } @@ -639,7 +640,7 @@ int __init init(void) return ret; } -void __exit fini(void) +static void __exit fini(void) { ip_conntrack_protocol_unregister(&ip_conntrack_protocol_sctp); #ifdef CONFIG_SYSCTL |