From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 4/5] netfilter: nfnetlink_queue: fix missing HW protocol
Date: Mon, 10 Jun 2013 18:07:40 +0200 [thread overview]
Message-ID: <1370880461-4265-5-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1370880461-4265-1-git-send-email-pablo@netfilter.org>
Locally generated IPv4 and IPv6 traffic gets skb->protocol unset,
thus passing zero.
ip6tables -I OUTPUT -j NFQUEUE
libmnl/examples/netfilter# ./nf-queue 0 &
ping6 ::1
packet received (id=1 hw=0x0000 hook=3)
^^^^^^
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nfnetlink_queue_core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
index 4e27fa0..5352b2d 100644
--- a/net/netfilter/nfnetlink_queue_core.c
+++ b/net/netfilter/nfnetlink_queue_core.c
@@ -637,9 +637,6 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum)
if (queue->copy_mode == NFQNL_COPY_NONE)
return -EINVAL;
- if ((queue->flags & NFQA_CFG_F_GSO) || !skb_is_gso(entry->skb))
- return __nfqnl_enqueue_packet(net, queue, entry);
-
skb = entry->skb;
switch (entry->pf) {
@@ -651,6 +648,9 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum)
break;
}
+ if ((queue->flags & NFQA_CFG_F_GSO) || !skb_is_gso(skb))
+ return __nfqnl_enqueue_packet(net, queue, entry);
+
nf_bridge_adjust_skb_data(skb);
segs = skb_gso_segment(skb, 0);
/* Does not use PTR_ERR to limit the number of error codes that can be
--
1.7.10.4
next prev parent reply other threads:[~2013-06-10 16:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 16:07 [PATCH 0/5] netfilter fixes for 3.10-rc5 Pablo Neira Ayuso
2013-06-10 16:07 ` [PATCH 1/5] netfilter: nfnetlink_acct: fix incomplete dumping of objects Pablo Neira Ayuso
2013-06-10 16:07 ` [PATCH 2/5] netfilter: nfnetlink_cttimeout: " Pablo Neira Ayuso
2013-06-10 16:07 ` [PATCH 3/5] netfilter: xt_TCPMSS: Fix violation of RFC879 in absence of MSS option Pablo Neira Ayuso
2013-06-11 8:43 ` David Laight
2013-06-10 7:19 ` Phil Oester
2013-06-11 15:00 ` David Laight
2013-06-10 8:27 ` Phil Oester
2013-06-11 16:09 ` David Laight
2013-06-11 16:25 ` Pablo Neira Ayuso
2013-06-11 18:00 ` Jeff Haran
2013-06-11 18:14 ` Rick Jones
2013-06-11 18:31 ` Jeff Haran
2013-06-21 8:27 ` Jan Engelhardt
2013-06-11 18:36 ` John Heffner
2013-06-10 16:07 ` Pablo Neira Ayuso [this message]
2013-06-10 16:07 ` [PATCH 5/5] ipvs: info leak in __ip_vs_get_dest_entries() Pablo Neira Ayuso
2013-06-10 20:32 ` [PATCH 0/5] netfilter fixes for 3.10-rc5 David Miller
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=1370880461-4265-5-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.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).