aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Leblond <eric@regit.org>2012-08-16 22:02:58 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-02 10:38:54 -0700
commitc182b9556632ce565dc7ecbb49759334628f75bb (patch)
treead9bdd2b2df8c72410c09af90557d79013beda0e /include
parentd8c8c1837a00c6da2522add7297af65166a23306 (diff)
af_packet: don't emit packet on orig fanout group
[ Upstream commit c0de08d04215031d68fa13af36f347a6cfa252ca ] If a packet is emitted on one socket in one group of fanout sockets, it is transmitted again. It is thus read again on one of the sockets of the fanout group. This result in a loop for software which generate packets when receiving one. This retransmission is not the intended behavior: a fanout group must behave like a single socket. The packet should not be transmitted on a socket if it originates from a socket belonging to the same fanout group. This patch fixes the issue by changing the transmission check to take fanout group info account. Reported-by: Aleksandr Kotov <a1k@mail.ru> Signed-off-by: Eric Leblond <eric@regit.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 2ac58b68d5d..b52070ab3af 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1520,6 +1520,8 @@ struct packet_type {
struct sk_buff **(*gro_receive)(struct sk_buff **head,
struct sk_buff *skb);
int (*gro_complete)(struct sk_buff *skb);
+ bool (*id_match)(struct packet_type *ptype,
+ struct sock *sk);
void *af_packet_priv;
struct list_head list;
};