summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorVladimir Oltean <olteanv@gmail.com>2019-06-08 08:04:38 -0400
committerDavid S. Miller <davem@davemloft.net>2019-06-08 18:20:40 -0400
commit79fa7061397a372256b466d62a0a81690b512d5f (patch)
treef011a19f732bb25b47c21251b70eb4affe4cf100 /net/dsa
parent24c01949e5552418a692b848e387dd6e79988b96 (diff)
net: dsa: sja1105: Make sja1105_is_link_local not match meta frames
Although meta frames are configured to be sent at SJA1105_META_DMAC (01-80-C2-00-00-0E) which is a multicast MAC address that would also be trapped by the switch to the CPU, were it to receive it on a front-panel port, meta frames are conceptually not link-local frames, they only carry their RX timestamps. The choice of sending meta frames at a multicast DMAC is a pragmatic one, to avoid installing an extra entry to the DSA master port's multicast MAC filter. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/tag_sja1105.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c
index 0beb52518d56..094711ced5c0 100644
--- a/net/dsa/tag_sja1105.c
+++ b/net/dsa/tag_sja1105.c
@@ -13,6 +13,8 @@ static inline bool sja1105_is_link_local(const struct sk_buff *skb)
13 const struct ethhdr *hdr = eth_hdr(skb); 13 const struct ethhdr *hdr = eth_hdr(skb);
14 u64 dmac = ether_addr_to_u64(hdr->h_dest); 14 u64 dmac = ether_addr_to_u64(hdr->h_dest);
15 15
16 if (ntohs(hdr->h_proto) == ETH_P_SJA1105_META)
17 return false;
16 if ((dmac & SJA1105_LINKLOCAL_FILTER_A_MASK) == 18 if ((dmac & SJA1105_LINKLOCAL_FILTER_A_MASK) ==
17 SJA1105_LINKLOCAL_FILTER_A) 19 SJA1105_LINKLOCAL_FILTER_A)
18 return true; 20 return true;