Thread (15 messages) 15 messages, 5 authors, 2013-04-02

Re: [PATCH v2] net IPv6 : Fix broken IPv6 routing table after loopback down-up

From: Eric Dumazet <hidden>
Date: 2013-03-28 13:44:28

On Thu, 2013-03-28 at 18:57 +0530, Balakumaran Kannan wrote:
IPv6 Routing table becomes broken once we do ifdown, ifup of the loopback(lo)
interface. After down-up, routes of other interface's IPv6 addresses through
'lo' are lost.
 	add_addr(idev, &in6addr_loopback, 128, IFA_HOST);
+
+	/* Add routes to other interface's IPv6 addresses */
+	rcu_read_lock();
+	for_each_netdev_rcu(dev_net(dev), sp_dev) {
+
We hold RTNL at this point, so why use RCU at all, and adding potential
long latencies ?

Just use for_each_netdev()

This way, a preemption is still allowed.

Also, I am not sure we need ipv6_find_idev()

__in6_dev_get() should be OK.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help