Netdev List
 help / color / mirror / Atom feed
* [PATCH] [AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded
@ 2007-11-06 15:25 PJ Waskiewicz
  2007-11-07 10:21 ` David Miller
  2007-11-11  6:03 ` David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: PJ Waskiewicz @ 2007-11-06 15:25 UTC (permalink / raw)
  To: davem; +Cc: netdev

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>
---

 net/packet/af_packet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 4cb2dfb..23eef6f 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -515,7 +515,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;
@@ -661,7 +661,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;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-11  6:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-06 15:25 [PATCH] [AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded PJ Waskiewicz
2007-11-07 10:21 ` David Miller
2007-11-07 11:00   ` Waskiewicz Jr, Peter P
2007-11-07 11:52     ` David Miller
2007-11-07 17:40       ` Waskiewicz Jr, Peter P
2007-11-11  6:03 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox