Commit 8032b464 authored by Peter P Waskiewicz Jr's avatar Peter P Waskiewicz Jr Committed by David S. Miller

[AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded

The socket option for packet sockets to return the original ifindex instead
of the bonded ifindex will not match multicast traffic.  Since this socket
option is the most useful for layer 2 traffic and multicast traffic, make
the option multicast-aware.
Signed-off-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 60d78c44
...@@ -509,7 +509,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet ...@@ -509,7 +509,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
sll->sll_hatype = dev->type; sll->sll_hatype = dev->type;
sll->sll_protocol = skb->protocol; sll->sll_protocol = skb->protocol;
sll->sll_pkttype = skb->pkt_type; sll->sll_pkttype = skb->pkt_type;
if (unlikely(po->origdev) && skb->pkt_type == PACKET_HOST) if (unlikely(po->origdev))
sll->sll_ifindex = orig_dev->ifindex; sll->sll_ifindex = orig_dev->ifindex;
else else
sll->sll_ifindex = dev->ifindex; sll->sll_ifindex = dev->ifindex;
...@@ -655,7 +655,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe ...@@ -655,7 +655,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
sll->sll_hatype = dev->type; sll->sll_hatype = dev->type;
sll->sll_protocol = skb->protocol; sll->sll_protocol = skb->protocol;
sll->sll_pkttype = skb->pkt_type; sll->sll_pkttype = skb->pkt_type;
if (unlikely(po->origdev) && skb->pkt_type == PACKET_HOST) if (unlikely(po->origdev))
sll->sll_ifindex = orig_dev->ifindex; sll->sll_ifindex = orig_dev->ifindex;
else else
sll->sll_ifindex = dev->ifindex; sll->sll_ifindex = dev->ifindex;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment