]> git.baikalelectronics.ru Git - kernel.git/commit
af_packet: don't emit packet on orig fanout group
authorEric Leblond <eric@regit.org>
Thu, 16 Aug 2012 22:02:58 +0000 (22:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Aug 2012 09:37:29 +0000 (02:37 -0700)
commitfedd75885190ecd21bb8bcf639e8667a11a75466
tree7352576a55b5ceb586e3f73c9f66be890b8bccca
parent68d6579fff23a7d4913c0a707f9f264c5d9250f9
af_packet: don't emit packet on orig fanout group

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>
include/linux/netdevice.h
net/core/dev.c
net/packet/af_packet.c