From: Florian Westphal <fw@strlen.de>
To: Nicolas Cavallari <Nicolas.Cavallari@lri.fr>
Cc: Patrick McHardy <kaber@trash.net>,
netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] netfilter: fix looped (broad|multi)cast's bogus MACs in NFQUEUE
Date: Wed, 8 Jun 2011 17:30:32 +0200 [thread overview]
Message-ID: <20110608153032.GA26912@Chamillionaire.breakpoint.cc> (raw)
In-Reply-To: <20110608151817.C95E24587D@pc11-132.lri.fr>
Nicolas Cavallari <Nicolas.Cavallari@lri.fr> wrote:
> 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 netfilter's netlink queue because it tries to extract a hardware
> address from these packets, but extracts a part of the IP header instead.
[..]
> patch done against 2.6.39.1 but should also apply to nf-next
> ---
> --- linux-2.6.39.1/net/netfilter/nfnetlink_queue.c 2011-06-08 14:43:41.188003302 +0200
> +++ linux-2.6.39.1/net/netfilter/nfnetlink_queue.c 2011-06-08 14:46:10.892003541 +0200
> @@ -335,7 +335,8 @@ nfqnl_build_packet_message(struct nfqnl_
> if (entskb->mark)
> NLA_PUT_BE32(skb, NFQA_MARK, htonl(entskb->mark));
>
> - if (indev && entskb->dev) {
> + if (indev && entskb->dev &&
> + entskb->network_header != entskb->mac_header) {
nfnetlink_log has the same problem.
next prev parent reply other threads:[~2011-06-08 15:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 15:18 [PATCH] netfilter: fix looped (broad|multi)cast's bogus MACs in NFQUEUE Nicolas Cavallari
2011-06-08 15:30 ` Florian Westphal [this message]
2011-06-09 13:39 ` Nicolas Cavallari
2011-06-09 13:39 ` [PATCH] netfilter: fix looped (broad|multi)cast's MAC handling Nicolas Cavallari
2011-06-09 16:08 ` Patrick McHardy
2011-06-10 7:20 ` Nicolas Cavallari
2011-06-16 15:27 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110608153032.GA26912@Chamillionaire.breakpoint.cc \
--to=fw@strlen.de \
--cc=Nicolas.Cavallari@lri.fr \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).