提交 aed65501 编写于 作者: G Glenn Wurster 提交者: David S. Miller

IPv6: Create temporary address if none exists.

If privacy extentions are enabled, but no current temporary address exists,
then create one when we get a router advertisement.
Signed-off-by: NGlenn Wurster <gwurster@scs.carleton.ca>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ded85aa8
...@@ -2021,10 +2021,11 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) ...@@ -2021,10 +2021,11 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len)
ipv6_ifa_notify(0, ift); ipv6_ifa_notify(0, ift);
} }
if (create && in6_dev->cnf.use_tempaddr > 0) { if ((create || list_empty(&in6_dev->tempaddr_list)) && in6_dev->cnf.use_tempaddr > 0) {
/* /*
* When a new public address is created as described in [ADDRCONF], * When a new public address is created as described in [ADDRCONF],
* also create a new temporary address. * also create a new temporary address. Also create a temporary
* address if it's enabled but no temporary address currently exists.
*/ */
read_unlock_bh(&in6_dev->lock); read_unlock_bh(&in6_dev->lock);
ipv6_create_tempaddr(ifp, NULL); ipv6_create_tempaddr(ifp, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册