diff options
author | John Dykstra <john.dykstra1@gmail.com> | 2009-03-11 12:22:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-11 12:22:51 -0400 |
commit | ff8cf9a93800e8118ea097c1aba7203d59a0f3f1 (patch) | |
tree | 27b02002a475ecde4346ba935da41d205d1b392e /net/ipv6/af_inet6.c | |
parent | db434ac6bff0d991d0b60166dc9d6405b873d0f7 (diff) |
ipv6: Fix BUG when disabled ipv6 module is unloaded
Do not try to "uninitialize" ipv6 if its initialization had been skipped
because module parameter disable=1 had been specified.
Reported-by: Thomas Backlund <tmb@mandriva.org>
Signed-off-by: John Dykstra <john.dykstra1@gmail.com>
Acked-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index da944eca2ca6..9c8309ed35cf 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -1192,6 +1192,9 @@ module_init(inet6_init); | |||
1192 | 1192 | ||
1193 | static void __exit inet6_exit(void) | 1193 | static void __exit inet6_exit(void) |
1194 | { | 1194 | { |
1195 | if (disable_ipv6) | ||
1196 | return; | ||
1197 | |||
1195 | /* First of all disallow new sockets creation. */ | 1198 | /* First of all disallow new sockets creation. */ |
1196 | sock_unregister(PF_INET6); | 1199 | sock_unregister(PF_INET6); |
1197 | /* Disallow any further netlink messages */ | 1200 | /* Disallow any further netlink messages */ |