From: Paul Guo <ggang@tilera.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>, <netfilter-devel@vger.kernel.org>
Subject: [PATCH] possible unaligned packet header caused by ip_route_me_harder()->pskb_expand_head()
Date: Mon, 14 Nov 2011 16:33:24 +0800 [thread overview]
Message-ID: <4EC0D254.7060503@tilera.com> (raw)
In-Reply-To: <20111113170233.GA16851@1984>
> git://1984.lsi.us.es/net/.git
OK. Here is the patch based on above git tree.
Signed-off-by: Paul Guo <ggang@tilera.com>
---
net/ipv4/netfilter.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c
index 929b27b..0dcb0fa 100644
--- a/net/ipv4/netfilter.c
+++ b/net/ipv4/netfilter.c
@@ -63,7 +63,8 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type)
/* Change in oif may mean change in hh_len. */
hh_len = skb_dst(skb)->dev->hard_header_len;
if (skb_headroom(skb) < hh_len &&
- pskb_expand_head(skb, hh_len - skb_headroom(skb), 0, GFP_ATOMIC))
+ pskb_expand_head(skb, HH_DATA_ALIGN(hh_len - skb_headroom(skb)),
+ 0, GFP_ATOMIC))
return -1;
return 0;
--
1.6.5.2
next prev parent reply other threads:[~2011-11-14 8:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 15:02 unaligned ip header due to ip_route_me_harder()->pskb_expand_head() Paul Guo
2011-11-08 16:58 ` Eric Dumazet
2011-11-09 9:33 ` Paul Guo
2011-11-09 9:48 ` Eric Dumazet
2011-11-10 7:33 ` Paul Guo
2011-11-13 17:02 ` Pablo Neira Ayuso
2011-11-14 8:33 ` Paul Guo [this message]
2011-11-14 9:46 ` [PATCH] possible unaligned packet header caused by ip_route_me_harder()->pskb_expand_head() Eric Dumazet
2011-11-14 11:00 ` Paul Guo
2011-11-21 17:47 ` Pablo Neira Ayuso
2011-11-16 16:54 ` Pablo Neira Ayuso
2011-11-21 10:30 ` Eric Dumazet
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=4EC0D254.7060503@tilera.com \
--to=ggang@tilera.com \
--cc=eric.dumazet@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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).