netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@redhat.com>
To: Tom Herbert <therbert@google.com>,
	davem@davemloft.net, alexander.duyck@gmail.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH net] gre: Use inner mac length when computing tunnel length
Date: Thu, 30 Oct 2014 08:52:41 -0700	[thread overview]
Message-ID: <54525EC9.8060702@redhat.com> (raw)
In-Reply-To: <1414683656-26493-1-git-send-email-therbert@google.com>

On 10/30/2014 08:40 AM, Tom Herbert wrote:
> Currently, skb_inner_network_header is used but this does not account
> for Ethernet header for ETH_P_TEB. Use skb_inner_mac_header which
> handles TEB and also should work with IP encapsulation in which case
> inner mac and inner network headers are the same.
>
> Tested: Ran TCP_STREAM over GRE, worked as expected.
>
> Signed-off-by: Tom Herbert <therbert@google.com>
> ---
>   net/ipv4/gre_offload.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
> index f6e345c..bb5947b 100644
> --- a/net/ipv4/gre_offload.c
> +++ b/net/ipv4/gre_offload.c
> @@ -47,7 +47,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
>
>   	greh = (struct gre_base_hdr *)skb_transport_header(skb);
>
> -	ghl = skb_inner_network_header(skb) - skb_transport_header(skb);
> +	ghl = skb_inner_mac_header(skb) - skb_transport_header(skb);
>   	if (unlikely(ghl < sizeof(*greh)))
>   		goto out;
>
>

This works for me.  We probably need to queue this up for stable as well 
since this bug goes back as far as 3.14.

Acked-by: Alexander Duyck <alexander.h.duyck@redhat.com>

  reply	other threads:[~2014-10-30 15:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 15:40 [PATCH net] gre: Use inner mac length when computing tunnel length Tom Herbert
2014-10-30 15:52 ` Alexander Duyck [this message]
2014-10-30 23:52 ` 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=54525EC9.8060702@redhat.com \
    --to=alexander.h.duyck@redhat.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.com \
    /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).