summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJohn Dykstra <john.dykstra1@gmail.com>2009-03-11 09:22:51 -0700
committerDavid S. Miller <davem@davemloft.net>2009-03-11 09:22:51 -0700
commitff8cf9a93800e8118ea097c1aba7203d59a0f3f1 (patch)
tree27b02002a475ecde4346ba935da41d205d1b392e /net
parentdb434ac6bff0d991d0b60166dc9d6405b873d0f7 (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')
-rw-r--r--net/ipv6/af_inet6.c3
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);
static void __exit inet6_exit(void)
{
+ if (disable_ipv6)
+ return;
+
/* First of all disallow new sockets creation. */
sock_unregister(PF_INET6);
/* Disallow any further netlink messages */