Commit ff8cf9a9 authored by John Dykstra's avatar John Dykstra Committed by David S. Miller

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: default avatarThomas Backlund <tmb@mandriva.org>
Signed-off-by: default avatarJohn Dykstra <john.dykstra1@gmail.com>
Acked-by: default avatarBrian Haley <brian.haley@hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent db434ac6
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment