]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: fix looped (broad|multi)cast's MAC handling
authorNicolas Cavallari <cavallar@lri.fr>
Thu, 16 Jun 2011 15:27:04 +0000 (17:27 +0200)
committerPatrick McHardy <kaber@trash.net>
Thu, 16 Jun 2011 15:27:04 +0000 (17:27 +0200)
commitcc910408afa75f9f3c546196bb2abfeab8a277bc
treef4c30741b465cdca9f533c74d9694884186badf4
parent1a525af05d6c157fbb4c18a9dab72251a3589c3e
netfilter: fix looped (broad|multi)cast's MAC handling

By default, when broadcast or multicast packet are sent from a local
application, they are sent to the interface then looped by the kernel
to other local applications, going throught netfilter hooks in the
process.

These looped packet have their MAC header removed from the skb by the
kernel looping code. This confuse various netfilter's netlink queue,
netlink log and the legacy ip_queue, because they try to extract a
hardware address from these packets, but extracts a part of the IP
header instead.

This patch prevent NFQUEUE, NFLOG and ip_QUEUE to include a MAC header
if there is none in the packet.

Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv4/netfilter/ip_queue.c
net/ipv6/netfilter/ip6_queue.c
net/netfilter/nfnetlink_log.c
net/netfilter/nfnetlink_queue.c