From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Eric Dumazet <eric.dumazet@gmail.com>,
Peter Schmitt <peter.schmitt82@yahoo.de>,
Pravin B Shelar <pshelar@nicira.com>
Subject: [PATCH 3.10 01/24] ip_gre: Fix WCCPv2 header parsing.
Date: Mon, 18 Nov 2013 10:42:11 -0800 [thread overview]
Message-ID: <20131118184222.158956366@linuxfoundation.org> (raw)
In-Reply-To: <20131118184222.017393843@linuxfoundation.org>
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pravin B Shelar <pshelar@nicira.com>
[ No applicable upstream commit, the upstream implementation is
now completely different and doesn't have this bug. ]
In case of WCCPv2 GRE header has extra four bytes. Following
patch pull those extra four bytes so that skb offsets are set
correctly.
CC: Eric Dumazet <eric.dumazet@gmail.com>
Reported-by: Peter Schmitt <peter.schmitt82@yahoo.de>
Tested-by: Peter Schmitt <peter.schmitt82@yahoo.de>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/net/ip_tunnels.h | 2 +-
net/ipv4/ip_gre.c | 2 +-
net/ipv4/ip_tunnel.c | 4 ++--
net/ipv4/ipip.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
--- a/include/net/ip_tunnels.h
+++ b/include/net/ip_tunnels.h
@@ -113,7 +113,7 @@ struct ip_tunnel *ip_tunnel_lookup(struc
__be32 key);
int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
- const struct tnl_ptk_info *tpi, bool log_ecn_error);
+ const struct tnl_ptk_info *tpi, int hdr_len, bool log_ecn_error);
int ip_tunnel_changelink(struct net_device *dev, struct nlattr *tb[],
struct ip_tunnel_parm *p);
int ip_tunnel_newlink(struct net_device *dev, struct nlattr *tb[],
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -335,7 +335,7 @@ static int ipgre_rcv(struct sk_buff *skb
iph->saddr, iph->daddr, tpi.key);
if (tunnel) {
- ip_tunnel_rcv(tunnel, skb, &tpi, log_ecn_error);
+ ip_tunnel_rcv(tunnel, skb, &tpi, hdr_len, log_ecn_error);
return 0;
}
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -402,7 +402,7 @@ static struct ip_tunnel *ip_tunnel_creat
}
int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
- const struct tnl_ptk_info *tpi, bool log_ecn_error)
+ const struct tnl_ptk_info *tpi, int hdr_len, bool log_ecn_error)
{
struct pcpu_tstats *tstats;
const struct iphdr *iph = ip_hdr(skb);
@@ -413,7 +413,7 @@ int ip_tunnel_rcv(struct ip_tunnel *tunn
skb->protocol = tpi->proto;
skb->mac_header = skb->network_header;
- __pskb_pull(skb, tunnel->hlen);
+ __pskb_pull(skb, hdr_len);
skb_postpull_rcsum(skb, skb_transport_header(skb), tunnel->hlen);
#ifdef CONFIG_NET_IPGRE_BROADCAST
if (ipv4_is_multicast(iph->daddr)) {
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -195,7 +195,7 @@ static int ipip_rcv(struct sk_buff *skb)
if (tunnel) {
if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
goto drop;
- return ip_tunnel_rcv(tunnel, skb, &tpi, log_ecn_error);
+ return ip_tunnel_rcv(tunnel, skb, &tpi, 0, log_ecn_error);
}
return -1;
next prev parent reply other threads:[~2013-11-18 18:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 18:42 [PATCH 3.10 00/24] 3.10.20-stable review Greg Kroah-Hartman
2013-11-18 18:42 ` Greg Kroah-Hartman [this message]
2013-11-18 18:42 ` [PATCH 3.10 02/24] ipv6: ip6_dst_check needs to check for expired dst_entries Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 03/24] ipv6: reset dst.expires value when clearing expire flag Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 04/24] cxgb3: Fix length calculation in write_ofld_wr() on 32-bit architectures Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 05/24] xen-netback: use jiffies_64 value to calculate credit timeout Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 06/24] virtio-net: correctly handle cpu hotplug notifier during resuming Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 07/24] net: flow_dissector: fail on evil iph->ihl Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 08/24] net/mlx4_core: Fix call to __mlx4_unregister_mac Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 09/24] xen-netback: Handle backend state transitions in a more robust way Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 10/24] xen-netback: transition to CLOSED when removing a VIF Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 11/24] batman-adv: set up network coding packet handlers during module init Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 12/24] hyperv-fb: add pci stub Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 13/24] USB: add new zte 3g-dongles pid to option.c Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 14/24] ALSA: hda - hdmi: Fix reported channel map on common default layouts Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 15/24] tracing: Fix potential out-of-bounds in trace_get_user() Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 16/24] perf: Fix perf ring buffer memory ordering Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 17/24] iwlwifi: add new 7260 and 3160 series device IDs Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 18/24] iwlwifi: pcie: add new SKUs for 7000 & 3160 NIC series Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 19/24] misc: atmel_pwm: add deferred-probing support Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 20/24] backlight: atmel-pwm-bl: fix deferred probe from __init Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 21/24] usb: fix cleanup after failure in hub_configure() Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 22/24] usb: fail on usb_hub_create_port_device() errors Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 23/24] usbcore: set lpm_capable field for LPM capable root hubs Greg Kroah-Hartman
2013-11-18 18:42 ` [PATCH 3.10 24/24] media: sh_vou: almost forever loop in sh_vou_try_fmt_vid_out() Greg Kroah-Hartman
2013-11-19 3:08 ` [PATCH 3.10 00/24] 3.10.20-stable review Guenter Roeck
2013-11-20 11:05 ` Satoru Takeuchi
2013-11-20 15:27 ` Shuah Khan
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=20131118184222.158956366@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.schmitt82@yahoo.de \
--cc=pshelar@nicira.com \
--cc=stable@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).