Netdev List
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: <netdev@vger.kernel.org>
Subject: Re: xfrm: Return error on unknown switch in init_state
Date: Fri, 5 Jan 2018 09:32:47 +0100	[thread overview]
Message-ID: <20180105083247.ce7hu2lmy64fyff5@gauss3.secunet.de> (raw)
In-Reply-To: <20180104112104.GA6437@gondor.apana.org.au>

On Thu, Jan 04, 2018 at 10:21:04PM +1100, Herbert Xu wrote:
> Currently esp will happily create an xfrm state with an unknown
> encap type for IPv4 or an unknown mode for IPv6, without setting
> the necessary state parameters.  This patch fixes it by returning
> -EINVAL.

Looks like we catch the unknown mode in __xfrm_init_state().
But in any case, if we want to return -EINVAL on unknown mode,
we should do it for IPv6 and for IPv4.

  reply	other threads:[~2018-01-05  8:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04 11:21 xfrm: Return error on unknown switch in init_state Herbert Xu
2018-01-05  8:32 ` Steffen Klassert [this message]
2018-01-05 11:12   ` [PATCH v2] xfrm: Return error on unknown encap_type " Herbert Xu
2018-01-09 11:59     ` Steffen Klassert

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=20180105083247.ce7hu2lmy64fyff5@gauss3.secunet.de \
    --to=steffen.klassert@secunet.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@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