netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: vincent@bernat.im
Cc: edumazet@google.com, roopa@cumulusnetworks.com, jbenc@redhat.com,
	netdev@vger.kernel.org, xiyou.wangcong@gmail.com
Subject: Re: [PATCH net-next v4] vxlan: fix ND proxy when skb doesn't have transport header offset
Date: Mon, 03 Apr 2017 18:51:48 -0700 (PDT)	[thread overview]
Message-ID: <20170403.185148.955031362401899474.davem@davemloft.net> (raw)
In-Reply-To: <20170402090006.17545-1-vincent@bernat.im>

From: Vincent Bernat <vincent@bernat.im>
Date: Sun,  2 Apr 2017 11:00:06 +0200

> When an incoming frame is tagged or when GRO is disabled, the skb
> handled to vxlan_xmit() doesn't contain a valid transport header
> offset. This makes ND proxying fail.
> 
> We combine two changes: replace use of skb_transport_offset() and ensure
> the necessary amount of skb is linear just before using it:
> 
>  - In vxlan_xmit(), when determining if we have an ICMPv6 neighbor
>    discovery packet, just check if it is an ICMPv6 packet and rely on
>    neigh_reduce() to do more checks if this is the case. The use of
>    pskb_may_pull() is replaced by skb_header_pointer() for just the IPv6
>    header.
> 
>  - In neigh_reduce(), add pskb_may_pull() for IPv6 header and neighbor
>    discovery message since this was removed from vxlan_xmit(). Replace
>    skb_transport_header() with ipv6_hdr() + 1.
> 
>  - In vxlan_na_create(), replace first skb_transport_offset() with
>    ipv6_hdr() + 1 and second with skb_network_offset() + sizeof(struct
>    ipv6hdr). Additionally, ensure we pskb_may_pull() the whole skb as we
>    need it to iterate over the options.
> 
> Signed-off-by: Vincent Bernat <vincent@bernat.im>

Applied, thanks.

      reply	other threads:[~2017-04-04  1:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 20:47 [net-next v2] vxlan: fix ND proxy when skb doesn't have transport header offset Vincent Bernat
2017-03-30  6:41 ` Vincent Bernat
2017-03-30 13:36   ` Eric Dumazet
2017-03-30 14:56     ` Vincent Bernat
2017-03-31  8:18     ` [net-next v3] " Vincent Bernat
2017-04-01 20:22       ` kbuild test robot
2017-04-02  9:00         ` [PATCH net-next v4] " Vincent Bernat
2017-04-04  1:51           ` David Miller [this message]

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=20170403.185148.955031362401899474.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jbenc@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=vincent@bernat.im \
    --cc=xiyou.wangcong@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).