diff mbox

[net] vxlan: fix check for migration of static entry

Message ID 1371590821-1125-1-git-send-email-stephen@networkplumber.org
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Stephen Hemminger June 18, 2013, 9:27 p.m. UTC
The check introduced by:
	commit 26a41ae604381c5cc0caf1c3261ca6b298b5fe69
	Author: stephen hemminger <stephen@networkplumber.org>
	Date:   Mon Jun 17 12:09:58 2013 -0700

	    vxlan: only migrate dynamic FDB entries

was not correct because it is checking flag about type of FDB
entry, rather than the state (dynamic versus static). The confusion
arises because vxlan is reusing values from bridge, and bridge is
reusing values from neighbour table, and easy to get lost in translation.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/vxlan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller June 19, 2013, 7:51 a.m. UTC | #1
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 18 Jun 2013 14:27:01 -0700

> The check introduced by:
> 	commit 26a41ae604381c5cc0caf1c3261ca6b298b5fe69
> 	Author: stephen hemminger <stephen@networkplumber.org>
> 	Date:   Mon Jun 17 12:09:58 2013 -0700
> 
> 	    vxlan: only migrate dynamic FDB entries
> 
> was not correct because it is checking flag about type of FDB
> entry, rather than the state (dynamic versus static). The confusion
> arises because vxlan is reusing values from bridge, and bridge is
> reusing values from neighbour table, and easy to get lost in translation.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied, thanks Stephen.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index dda997a..57325f3 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -579,7 +579,7 @@  static bool vxlan_snoop(struct net_device *dev,
 			return false;
 
 		/* Don't migrate static entries, drop packets */
-		if (!(f->flags & NTF_SELF))
+		if (f->state & NUD_NOARP)
 			return true;
 
 		if (net_ratelimit())