提交 14ee6742 编写于 作者: L Lennert Buytenhek 提交者: David S. Miller

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: NLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5cd33db2
...@@ -159,6 +159,7 @@ static int dsa_rcv(struct sk_buff *skb, struct net_device *dev, ...@@ -159,6 +159,7 @@ static int dsa_rcv(struct sk_buff *skb, struct net_device *dev,
skb->dev = ds->ports[source_port]; skb->dev = ds->ports[source_port];
skb_push(skb, ETH_HLEN); skb_push(skb, ETH_HLEN);
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, skb->dev); skb->protocol = eth_type_trans(skb, skb->dev);
skb->dev->last_rx = jiffies; skb->dev->last_rx = jiffies;
......
...@@ -178,6 +178,7 @@ static int edsa_rcv(struct sk_buff *skb, struct net_device *dev, ...@@ -178,6 +178,7 @@ static int edsa_rcv(struct sk_buff *skb, struct net_device *dev,
skb->dev = ds->ports[source_port]; skb->dev = ds->ports[source_port];
skb_push(skb, ETH_HLEN); skb_push(skb, ETH_HLEN);
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, skb->dev); skb->protocol = eth_type_trans(skb, skb->dev);
skb->dev->last_rx = jiffies; skb->dev->last_rx = jiffies;
......
...@@ -95,6 +95,7 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev, ...@@ -95,6 +95,7 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev,
skb->dev = ds->ports[source_port]; skb->dev = ds->ports[source_port];
skb_push(skb, ETH_HLEN); skb_push(skb, ETH_HLEN);
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, skb->dev); skb->protocol = eth_type_trans(skb, skb->dev);
skb->dev->last_rx = jiffies; skb->dev->last_rx = jiffies;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册