public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Vincent Bernat <vincent@bernat•im>
To: Eric Dumazet <edumazet@google•com>
Cc: Roopa Prabhu <roopa@cumulusnetworks•com>,
	"David S. Miller" <davem@davemloft•net>,
	Jiri Benc <jbenc@redhat•com>,
	netdev@vger•kernel.org
Subject: Re: [net-next v2] vxlan: fix ND proxy when skb doesn't have transport header offset
Date: Thu, 30 Mar 2017 08:41:51 +0200	[thread overview]
Message-ID: <m360irs1u8.fsf@luffy.cx> (raw)
In-Reply-To: <20170329204704.26087-1-vincent@bernat.im> (Vincent Bernat's message of "Wed, 29 Mar 2017 22:47:04 +0200")

 ❦ 29 mars 2017 22:47 +0200, Vincent Bernat <vincent@bernat•im> :

> Parsing of neighbor discovery options is done earlier to ignore the
> whole packet in case of a malformed option. Moreover, the assumption the
> skb was linear is removed and options are extracted with
> skb_header_pointer() as well. The check on the source link-layer address
> option is also more strict (for Ethernet, we expect the length field to
> be 1).

There is some parsing implemented in net/ipv6/ndisc.c, notably
ndisc_parse_options(). I don't know if this is a good idea to reuse
that: it may have the expectation that some IP processing has already
been done (for example, the IPv6 length has already been checked, the
SKB is expected to be linear).
-- 
Watch out for off-by-one errors.
            - The Elements of Programming Style (Kernighan & Plauger)

  reply	other threads:[~2017-03-30  6:50 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 [this message]
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

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=m360irs1u8.fsf@luffy.cx \
    --to=vincent@bernat$(echo .)im \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=jbenc@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=roopa@cumulusnetworks$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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