mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
net: ipv6: minor: use in6addr_any in token init
Since we check for !ipv6_addr_any(&in6_dev->token) in addrconf_prefix_rcv(), make the token initialization on device setup more intuitive by using in6addr_any as an initializer. Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
67a366064a
commit
914faa147b
@ -422,7 +422,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
|
||||
ipv6_regen_rndid((unsigned long) ndev);
|
||||
}
|
||||
#endif
|
||||
memset(ndev->token.s6_addr, 0, sizeof(ndev->token.s6_addr));
|
||||
ndev->token = in6addr_any;
|
||||
|
||||
if (netif_running(dev) && addrconf_qdisc_ok(dev))
|
||||
ndev->if_flags |= IF_READY;
|
||||
|
Loading…
Reference in New Issue
Block a user