Skip to content

Commit 36ff681

Browse files
rhodaszikuba-moo
authored andcommitted
net: dsa: tag_ocelot_8021q: fix broken reception
The blamed commit changed the dsa_8021q_rcv() calling convention to accept pre-populated source_port and switch_id arguments. If those are not available, as in the case of tag_ocelot_8021q, the arguments must be pre-initialized with -1. Due to the bug of passing uninitialized arguments in tag_ocelot_8021q, dsa_8021q_rcv() does not detect that it needs to populate the source_port and switch_id, and this makes dsa_conduit_find_user() fail, which leads to packet loss on reception. Fixes: dcfe767 ("net: dsa: tag_sja1105: absorb logic for not overwriting precise info into dsa_8021q_rcv()") Signed-off-by: Robert Hodaszi <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 5af5357 commit 36ff681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/dsa/tag_ocelot_8021q.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static struct sk_buff *ocelot_xmit(struct sk_buff *skb,
7979
static struct sk_buff *ocelot_rcv(struct sk_buff *skb,
8080
struct net_device *netdev)
8181
{
82-
int src_port, switch_id;
82+
int src_port = -1, switch_id = -1;
8383

8484
dsa_8021q_rcv(skb, &src_port, &switch_id, NULL, NULL);
8585

0 commit comments

Comments
 (0)