Skip to content

Commit ff8cf9a

Browse files
jdykstradavem330
authored andcommitted
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 <[email protected]> Signed-off-by: John Dykstra <[email protected]> Acked-by: Brian Haley <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent db434ac commit ff8cf9a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/ipv6/af_inet6.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,6 +1192,9 @@ module_init(inet6_init);
11921192

11931193
static void __exit inet6_exit(void)
11941194
{
1195+
if (disable_ipv6)
1196+
return;
1197+
11951198
/* First of all disallow new sockets creation. */
11961199
sock_unregister(PF_INET6);
11971200
/* Disallow any further netlink messages */

0 commit comments

Comments
 (0)