Thread (13 messages) 13 messages, 3 authors, 2017-01-24
STALE3534d

[PATCH cumulus-4.1.y 1/5] vxlan: flush fdb entries on oper down

From: Roopa Prabhu <hidden>
Date: 2017-01-21 07:41:06
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Balakrishnan Raman <redacted>

Flush fdb entries of a vxlan device when its state
changes to oper down. vxlan_stop handles flush on
admin down.

Signed-off-by: Balakrishnan Raman <redacted>
Signed-off-by: Roopa Prabhu <redacted>
---
 drivers/net/vxlan.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 19b1653..15b1c23 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -3276,6 +3276,12 @@ static int vxlan_netdevice_event(struct notifier_block *unused,
 		vxlan_handle_lowerdev_unregister(vn, dev);
 	else if (event == NETDEV_UDP_TUNNEL_PUSH_INFO)
 		vxlan_push_rx_ports(dev);
+	else if (event == NETDEV_CHANGE) {
+		if (dev->netdev_ops == &vxlan_netdev_ops) {
+			if (netif_running(dev) && !netif_oper_up(dev))
+				vxlan_flush(netdev_priv(dev));
+		}
+	}
 
 	return NOTIFY_DONE;
 }
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help