Skip to content

Commit

Permalink
net: dsa: ksz: Add STP multicast handling
Browse files Browse the repository at this point in the history
In case the destination address is link local, add override bit into the
switch tag to let such a packet through the switch even if the port is
blocked.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: Woojung Huh <woojung.huh@microchip.com>
Cc: David S. Miller <davem@davemloft.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Marek Vasut authored and David S. Miller committed Dec 16, 2018
1 parent bafe9ba commit 8a75b9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/dsa/tag_ksz.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ static struct sk_buff *ksz9477_xmit(struct sk_buff *skb,
addr = skb_mac_header(nskb);

*tag = BIT(dp->index);

if (is_link_local_ether_addr(addr))
*tag |= KSZ9477_TAIL_TAG_OVERRIDE;

*tag = cpu_to_be16(*tag);

return nskb;
Expand Down

0 comments on commit 8a75b9d

Please sign in to comment.