]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded
authorPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Sun, 11 Nov 2007 06:03:25 +0000 (22:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Nov 2007 06:03:25 +0000 (22:03 -0800)
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>
net/packet/af_packet.c

index 36331a5f0abed1b5cff2633e523bd6b1ade072ae..eb6be5030c70ea7e0bb8b28af520e34fa4f4805a 100644 (file)
@@ -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;
@@ -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;