From: Patrick McHardy <kaber@trash.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: BUG: warning at net/core/dev.c:1171/skb_checksum_help() 2.6.18-rc3
Date: Tue, 01 Aug 2006 09:19:34 +0200 [thread overview]
Message-ID: <44CF0086.1030404@trash.net> (raw)
In-Reply-To: <44CE4DCA.8000609@trash.net>
[-- Attachment #1: Type: text/plain, Size: 921 bytes --]
Patrick McHardy wrote:---------------
> [NETFILTER]: nf_queue: handle GSO packets
>
> Handle GSO packets in nf_queue by segmenting them before queueing to
> avoid breaking GSO in case they get mangled.
While testing this patch I noticed that some meta-data is lost when
segmenting packets. With the attached patch it works fine. Some of
the fields may not appear necessary, so here's my reasoning:
- nfct/nfctinfo/nfct_reasm: the xfrm output path does an immediate
nf_reset, so they were not necessary until now. Queueing can happen
on any hook, so we need to preserve them.
- nf_bridge: needed for GSO on a bridge device until the deferred
hooks are removed
- tc_verd/tc_index/input_dev: when directing a packet from a device
supporting GSO to a device not supporting GSO using tc actions,
these fields may be set.
Herbert, does this look sane to you?
Signed-off-by: Patrick McHardy <kaber@trash.net>
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1011 bytes --]
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 3a12ff1..9c6ef32 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1948,6 +1948,31 @@ struct sk_buff *skb_segment(struct sk_bu
nskb->dev = skb->dev;
nskb->priority = skb->priority;
+#ifdef CONFIG_NETFILTER
+ nskb->nfmark = skb->nfmark;
+ nskb->nfct = skb->nfct;
+ nf_conntrack_get(skb->nfct);
+ nskb->nfctinfo = skb->nfctinfo;
+#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
+ nskb->nfct_reasm = skb->nfct_reasm;
+ nf_conntrack_get_reasm(skb->nfct_reasm);
+#endif
+#ifdef CONFIG_BRIDGE_NETFILTER
+ nskb->nf_bridge = skb->nf_bridge;
+ nf_bridge_get(skb->nf_bridge);
+#endif
+#endif
+#ifdef CONFIG_NET_SCHED
+#ifdef CONFIG_NET_CLS_ACT
+ nskb->input_dev = skb->input_dev;
+ nskb->tc_verd = skb->tc_verd;
+#endif
+ nskb->tc_index = skb->tc_index;
+#endif
+ skb_copy_secmark(nskb, skb);
nskb->protocol = skb->protocol;
nskb->dst = dst_clone(skb->dst);
memcpy(nskb->cb, skb->cb, sizeof(skb->cb));
next prev parent reply other threads:[~2006-08-01 7:19 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-31 4:16 BUG: warning at net/core/dev.c:1171/skb_checksum_help() 2.6.18-rc3 David Coulson
2006-07-31 4:24 ` Patrick McHardy
2006-07-31 4:59 ` David Miller
2006-07-31 5:07 ` Patrick McHardy
2006-07-31 10:39 ` Patrick McHardy
2006-07-31 11:30 ` Herbert Xu
2006-07-31 18:36 ` Patrick McHardy
2006-07-31 21:15 ` David Miller
2006-07-31 21:36 ` Patrick McHardy
2006-07-31 21:54 ` David Miller
2006-08-01 7:00 ` David Miller
2006-08-01 7:04 ` Herbert Xu
2006-08-01 7:22 ` Patrick McHardy
2006-08-01 15:34 ` Phil Oester
2006-08-01 22:04 ` Herbert Xu
2006-08-01 7:19 ` Patrick McHardy [this message]
2006-08-01 7:23 ` Herbert Xu
2006-08-01 7:36 ` David Miller
2006-08-01 7:45 ` Herbert Xu
2006-08-01 12:00 ` Jamal Hadi Salim
2006-08-01 12:34 ` Herbert Xu
2006-08-01 12:55 ` Jamal Hadi Salim
2006-08-01 7:38 ` Patrick McHardy
2006-08-01 11:51 ` Herbert Xu
2006-08-03 9:21 ` Patrick McHardy
2006-08-03 9:30 ` Herbert Xu
2006-08-03 9:34 ` Patrick McHardy
2006-08-01 12:29 ` Herbert Xu
2006-08-03 9:29 ` Patrick McHardy
2006-08-03 9:33 ` Herbert Xu
2006-08-03 9:40 ` Patrick McHardy
2006-08-03 9:57 ` Herbert Xu
2006-08-05 7:13 ` Patrick McHardy
2006-08-05 7:59 ` Herbert Xu
2006-08-01 22:03 ` Herbert Xu
2006-08-03 9:30 ` Patrick McHardy
2006-08-02 0:49 ` Herbert Xu
2006-08-03 9:32 ` Patrick McHardy
2006-08-03 9:36 ` Herbert Xu
2006-08-03 9:43 ` Patrick McHardy
2006-07-31 4:34 ` Andrew Morton
2006-07-31 4:42 ` David Coulson
2006-07-31 4:58 ` 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=44CF0086.1030404@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@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).