On 16.12.2015 16:44, Bjørn Mork wrote: > Add a new address generator mode, using the stable address generator > with an automatically generated secret. This is intended as a default > address generator mode for device types with no EUI64 implementation. > The new generator is used for ARPHRD_NONE interfaces initially, adding > default IPv6 autoconf support to e.g. tun interfaces. > > If the addrgenmode is set to 'random', either by default or manually, > and no stable secret is available, then a random secret is used as > input for the stable-privacy address generator. The secret can be > read and modified like manually configured secrets, using the proc > interface. Modifying the secret will change the addrgen mode to > 'stable-privacy' to indicate that it operates on a known secret. > > Existing behaviour of the 'stable-privacy' mode is kept unchanged. If > a known secret is available when the device is created, then the mode > will default to 'stable-privacy' as before. The mode can be manually > set to 'random' but it will behave exactly like 'stable-privacy' in > this case. The secret will not change. > > Cc: Hannes Frederic Sowa <han...@stressinduktion.org> > Cc: 吉藤英明 <hideaki.yoshif...@miraclelinux.com> > Signed-off-by: Bjørn Mork <bj...@mork.no> > --- > Changes since RFC: > - use IN6_ADDR_GEN_MODE_RANDOM as requested > - set the device type specific default in addrconf_dev_config() instead > of ipv6_add_dev() to catch device type changes > > I guess an explanation is needed for the last change: My primary > use case for this is the raw-ip support recently added to the qmi_wwan > driver. This driver creates an ARPHRD_ETHER device which can be morphed > into an ARPHRD_NONE device. So at device creation time everything is > fine and EUI64 is supported. But when the link is set up, the device > type is change and EUI64 does not work. So I needed to override the > default for ARPHRD_NONE at link up time. > > An alternative would be to keep the ipv6_add_dev() code and add device > type change notifier code. That seemed messier to me. Besides, we > already do type based address configuration decisions in > addrconf_dev_config(), deciding whether autoconfiguration is available > or not.
Agreed to your statements above and I reviewed the patch. Also, I can't see any bad side effects resulting in ARPHRD_NONE interfaces picking up link local addresses in general. Acked-by: Hannes Frederic Sowa <han...@stressinduktion.org> Thanks, Hannes -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html