瀏覽代碼

vxlan: fix check for migration of static entry

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger 12 年之前
父節點
當前提交
eb064c3b49
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/vxlan.c

+ 1 - 1
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())