diff options
author | Lennert Buytenhek <buytenh@marvell.com> | 2008-11-10 21:52:42 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-10 21:52:42 -0800 |
commit | 14ee6742b1b5df275cd2d771b4562b4f808c9419 (patch) | |
tree | a3e4e3ded1c6f903b3a2abff6e232e473ae69634 /net/dsa | |
parent | 5cd33db2120b5ce972568711156f91da83bff2d7 (diff) | |
download | linux-stable-14ee6742b1b5df275cd2d771b4562b4f808c9419.tar.gz linux-stable-14ee6742b1b5df275cd2d771b4562b4f808c9419.tar.bz2 linux-stable-14ee6742b1b5df275cd2d771b4562b4f808c9419.zip |
dsa: fix skb->pkt_type when mac address of slave interface differs
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>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/tag_dsa.c | 1 | ||||
-rw-r--r-- | net/dsa/tag_edsa.c | 1 | ||||
-rw-r--r-- | net/dsa/tag_trailer.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c index bdc0510b53b7..31866543332e 100644 --- a/net/dsa/tag_dsa.c +++ b/net/dsa/tag_dsa.c @@ -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; diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c index f985ea993843..9f4ce55eae59 100644 --- a/net/dsa/tag_edsa.c +++ b/net/dsa/tag_edsa.c @@ -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; diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c index d3117764b2c2..efd26697e716 100644 --- a/net/dsa/tag_trailer.c +++ b/net/dsa/tag_trailer.c @@ -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; |