Skip to content

Commit

Permalink
ipv6: Fix BUG when disabled ipv6 module is unloaded
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Dykstra authored and David S. Miller committed Mar 11, 2009
1 parent db434ac commit ff8cf9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ff8cf9a

Please sign in to comment.