Re: [PATCH main-v4.9-rc7] net/ipv6: allow sysctl to change link-local address generation mode

2016-12-01 Thread Cong Wang
On Thu, Dec 1, 2016 at 6:14 PM, Felix Jia wrote: > +static void addrconf_addrgenmode_change(struct net *net) > +{ > + struct net_device *dev; > + struct inet6_dev *idev; > + > + read_lock(_base_lock); > + for_each_netdev(net, dev) { > +

[PATCH main-v4.9-rc7] net/ipv6: allow sysctl to change link-local address generation mode

2016-12-01 Thread Felix Jia
The address generation mode for IPv6 link-local can only be configured by netlink messages. This patch adds the ability to change the address generation mode via sysctl. An possible improvement is to remove the addrgenmode variable from the idev structure and use the systcl storage for the flag.