Skip to content

Commit

Permalink
dsa: fix skb->pkt_type when mac address of slave interface differs
Browse files Browse the repository at this point in the history
When a dsa slave interface has a mac address that differs from that
of the master interface, eth_type_trans() won't explicitly set
skb->pkt_type back to PACKET_HOST -- we need to do this ourselves
before calling eth_type_trans().

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lennert Buytenhek authored and davem330 committed Nov 11, 2008
1 parent 5cd33db commit 14ee674
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/dsa/tag_dsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ static int dsa_rcv(struct sk_buff *skb, struct net_device *dev,

skb->dev = ds->ports[source_port];
skb_push(skb, ETH_HLEN);
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, skb->dev);

skb->dev->last_rx = jiffies;
Expand Down
1 change: 1 addition & 0 deletions net/dsa/tag_edsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ static int edsa_rcv(struct sk_buff *skb, struct net_device *dev,

skb->dev = ds->ports[source_port];
skb_push(skb, ETH_HLEN);
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, skb->dev);

skb->dev->last_rx = jiffies;
Expand Down
1 change: 1 addition & 0 deletions net/dsa/tag_trailer.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev,

skb->dev = ds->ports[source_port];
skb_push(skb, ETH_HLEN);
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, skb->dev);

skb->dev->last_rx = jiffies;
Expand Down

0 comments on commit 14ee674

Please sign in to comment.