netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@redhat.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net] nsh: set mac len based on inner packet
Date: Thu, 12 Jul 2018 09:28:05 +0200	[thread overview]
Message-ID: <20180712092805.19bbe4c2@redhat.com> (raw)
In-Reply-To: <20180711160046.198091-1-willemdebruijn.kernel@gmail.com>

On Wed, 11 Jul 2018 12:00:44 -0400, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
> 
> When pulling the NSH header in nsh_gso_segment, set the mac length
> based on the encapsulated packet type.
> 
> skb_reset_mac_len computes an offset to the network header, which
> here still points to the outer packet:
> 
>   >     skb_reset_network_header(skb);
>   >     [...]
>   >     __skb_pull(skb, nsh_len);
>   >     skb_reset_mac_header(skb);    // now mac hdr starts nsh_len == 8B after net hdr
>   >     skb_reset_mac_len(skb);       // mac len = net hdr - mac hdr == (u16) -8 == 65528
>   >     [..]
>   >     skb_mac_gso_segment(skb, ..)  
> 
> Link: http://lkml.kernel.org/r/CAF=yD-KeAcTSOn4AxirAxL8m7QAS8GBBe1w09eziYwvPbbUeYA@mail.gmail.com
> Reported-by: syzbot+7b9ed9872dab8c32305d@syzkaller.appspotmail.com
> Fixes: c411ed854584 ("nsh: add GSO support")
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Acked-by: Jiri Benc <jbenc@redhat.com>

  parent reply	other threads:[~2018-07-12  7:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 16:00 [PATCH net] nsh: set mac len based on inner packet Willem de Bruijn
2018-07-11 16:00 ` [PATCH net] packet: reset network header if packet shorter than ll reserved space Willem de Bruijn
2018-07-12 23:57   ` David Miller
2018-07-11 16:00 ` [PATCH net] selftests: in udpgso_bench do not test udp zerocopy Willem de Bruijn
2018-07-12 23:57   ` David Miller
2018-07-12  7:28 ` Jiri Benc [this message]
2018-07-12 23:57 ` [PATCH net] nsh: set mac len based on inner packet 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=20180712092805.19bbe4c2@redhat.com \
    --to=jbenc@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.com \
    --cc=willemdebruijn.kernel@gmail.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).