Subject: Re: disabling ipv6 (when ipv6 module is already loaded or built in)

From: Arkadiusz Miskiewicz <[email-masked]>
Date: Sun, 27 Mar 2011 23:19:15 +0200

On Friday 25 of March 2011, David Miller wrote:
> From: Arkadiusz Miskiewicz <[email-masked]>
> Date: Fri, 25 Mar 2011 23:53:06 +0100
> 
> > The whole problem is that socket(AF_INET6,...) is allowed. If setting
> > net.ipv6.conf.all.disable_ipv6=1 would also prevent such socket() from
> > succeeding then everything would be fine.
> 
> You have to make this setting before the module loads, once we register
> the protocol handlers (which is what allows socket() to succeed) the
> cat is out of the bag.
> 
> If even just one socket exists, we can't perform the steps necessary
> to block new ones.
> 
> That's why you have to use the module option, and it is the only way
> to block this class of operations.

Hm, maybe then it could be done in a way where ipv6 is initially built in but 
disabled and could be permanently enabled via sysfs/proc/something based on a 
userspace (or user/admin) decision runtime? That would be analogous to 
"modprobe ipv6" in kernel with modular ipv6.

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/