lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Mar 2009 07:51:24 -0400
From:	Vlad Yasevich <vladislav.yasevich@...com>
To:	Kolbjørn Barmen <linux@...la.no>
CC:	Brian Haley <brian.haley@...com>, davem@...emloft.net,
	yoshfuji@...ux-ipv6.org, netdev@...r.kernel.org
Subject: Re: [PATCH] IPv6: Add 'autoconf' and 'disable_ipv6' module parameters

Kolbjørn Barmen wrote:
> 
>> Also, it looks like if someone decides to switch IPv6 back on for a particular
>> interface, they would have to wait until the next RA to get an address.  Not an
>> optimum solution.
> 
> Isnt this the normal way anyways, or do new interfaces send some sort of
> "I'm new here, give me a prefix and router announcement, please!" normally
> when they go online? If so, maybe that should be done here as well.
> 

When the interface first comes up, it sends a Router Solicitation that triggers
the RA.


>>> @@ -1874,11 +1875,11 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len)
>>>  
>>>  	/* Try to figure out our local address for this prefix */
>>>  
>>> -	if (pinfo->autoconf && in6_dev->cnf.autoconf) {
>>> +	if (pinfo->autoconf && in6_dev->cnf.autoconf &&
>>> +	    net->ipv6.devconf_all->autoconf) {
>>>  		struct inet6_ifaddr * ifp;
>>>  		struct in6_addr addr;
>>>  		int create = 0, update_lft = 0;
>>> -		struct net *net = dev_net(dev);
>>>  
>>>  		if (pinfo->prefix_len == 64) {
>>>  			memcpy(&addr, &pinfo->prefix, 8);
>>> @@ -4378,6 +4379,11 @@ static int addrconf_init_net(struct net *net)
>>>  		dflt = kmemdup(dflt, sizeof(ipv6_devconf_dflt), GFP_KERNEL);
>>>  		if (dflt == NULL)
>>>  			goto err_alloc_dflt;
>>> +	} else {
>>> +		/* these will be inherited by all namespaces */
>>> +		all->autoconf = dflt->autoconf = ipv6_defaults.autoconf;
>>> +		all->disable_ipv6 = dflt->disable_ipv6 =
>>> +			ipv6_defaults.disable_ipv6;
>> Why set 'all'?  Since no interfaces are created yet, setting dflt accomplishes
>> what you want.
> 
> How do you know that no interfaces are created? The IPv6 modules might not
> have been loaded on boot, but at a later stage.
> 

Ah, but the IPv6 portions of the interface are created by the ipv6 module
when it loads.  At the addrconf_init_net() time, no interface are created yet.

-vlad

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ