Skip to content

Commit

Permalink
[AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded
Browse files Browse the repository at this point in the history
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: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
ppwaskie authored and davem330 committed Nov 11, 2007
1 parent 60d78c4 commit 8032b46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_protocol = skb->protocol;
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;
else
sll->sll_ifindex = dev->ifindex;
Expand Down Expand Up @@ -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_protocol = skb->protocol;
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;
else
sll->sll_ifindex = dev->ifindex;
Expand Down

0 comments on commit 8032b46

Please sign in to comment.