On Thu, 27 Sep 2007 13:54:23 +0200 Helge Hafting <helge.hafting@aitel.hist.no> wrote:You need every socket to close and all routes to go away including the routes through loopback device, and still there probably are control sockets buried inside ipv6 that hold ref count. IMHO the kernel should just admit that IPV6 can't be removed. --- a/net/ipv6/af_inet6.c 2007-09-26 16:28:01.000000000 -0700 +++ b/net/ipv6/af_inet6.c 2007-09-26 17:38:23.000000000 -0700 @@ -914,6 +914,9 @@ out_unregister_tcp_proto: } module_init(inet6_init); +/* Disabled at present because it is impossible to remove all references */ +#ifdef IPV6_UNLOAD + static void __exit inet6_exit(void) { /* First of all disallow new sockets creation. */ @@ -952,5 +955,6 @@ static void __exit inet6_exit(void) proto_unregister(&tcpv6_prot); } module_exit(inet6_exit); +#endif MODULE_ALIAS_NETPROTO(PF_INET6); --- a/net/ipv6/addrconf.c 2007-09-26 15:07:35.000000000 -0700 +++ b/net/ipv6/addrconf.c 2007-09-26 17:36:52.000000000 -0700 @@ -4255,6 +4255,7 @@ errout: return err; } +#ifdef IPV6_UNLOAD void __exit addrconf_cleanup(void) { struct net_device *dev; @@ -4308,3 +4309,4 @@ void __exit addrconf_cleanup(void) proc_net_remove(&init_net, "if_inet6"); #endif } +#endif --- a/net/ipv6/ipv6_sockglue.c 2007-09-26 15:07:35.000000000 -0700 +++ b/net/ipv6/ipv6_sockglue.c 2007-09-26 17:36:17.000000000 -0700 @@ -1132,7 +1132,9 @@ void __init ipv6_packet_init(void) dev_add_pack(&ipv6_packet_type); } -void ipv6_packet_cleanup(void) +#ifdef IPV6_UNLOAD +void __exit ipv6_packet_cleanup(void) { dev_remove_pack(&ipv6_packet_type); } +#endif -
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Linus Torvalds | Linux 2.6.27-rc5 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| David Miller | Slow DOWN, please!!! |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Natalie Protasevich | [BUG] New Kernel Bugs |
