netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: <trajaraman@mvista.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xfrm: Added the auth and enc update support in "state update"
Date: Tue, 7 Mar 2017 13:56:13 +0100	[thread overview]
Message-ID: <20170307125613.GL694@gauss.secunet.com> (raw)
In-Reply-To: <1488888193-4071-1-git-send-email-trajaraman@mvista.com>

On Tue, Mar 07, 2017 at 05:33:13PM +0530, trajaraman@mvista.com wrote:
> From: Thiruvadi rajaraman <trajaraman@mvista.com>
> 
> The "ip xfrm state update" process doesn't update the new authendication
> and encryption keys as well as it doesn't return an error.
> 
> Test logs: (Default)
> ==========
> ~# ip xfrm state list
> ~# ip xfrm state add src fe80::/10 dst ff02::3 proto esp spi 1235 mode transport auth sha1 0xAABBCCDDEEFF0010 enc des 0xAABBCCDDEEFF0010
> ~# ip xfrm state list
> src fe80:: dst ff02::3
>         proto esp spi 0x000004d3 reqid 0 mode transport
>         replay-window 0
>         auth-trunc hmac(sha1) 0xaabbccddeeff0010 96
>         enc cbc(des) 0xaabbccddeeff0010
>         sel src ::/0 dst ::/0
> ~#
> 
> ~# ip xfrm state update src fe80::/10 dst ff02::3 proto esp spi 1235 mode transport auth sha1 0xAABBCCDDEEFF0015 enc des 0xAABBCCDDEEFF0020
> src fe80:: dst ff02::3
>         proto esp spi 0x000004d3 reqid 0 mode transport
>         replay-window 0
>         auth-trunc hmac(sha1) 0xaabbccddeeff0010 96   ----> [ Auth key doesn't changed and remains same ]
>         enc cbc(des) 0xaabbccddeeff0010               ----> [  Enc key doesn't changed and remains same ]

This is intentional, the original state is not XFRM_STATE_ACQ,
so you are not allowed to update keys without requesting for
a new SPI. The original code was written 15 years ago, based
on RFC 2367 (PF_KEY) which says we must return -EINVAL in this
case. So if we change this, we should return an error.

      reply	other threads:[~2017-03-07 13:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07 12:03 [PATCH] xfrm: Added the auth and enc update support in "state update" trajaraman
2017-03-07 12:56 ` Steffen Klassert [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=20170307125613.GL694@gauss.secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=trajaraman@mvista.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).