Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Nov 2017 11:33:13 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325355 - head/sys/netipsec
Message-ID:  <201711031133.vA3BXDBT014152@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Fri Nov  3 11:33:13 2017
New Revision: 325355
URL: https://svnweb.freebsd.org/changeset/base/325355

Log:
  Use correct pointer in key_updateaddresses() when updating NAT-T config.
  
  key_updateaddresses() is used to update SA addresses and NAT-T
  configuration in SADB_UPDATE message. This is done using cloning SA
  content from old SA into new one. But addresses and NAT-T configuration
  are taking from SADB_UPDATE message. Use newsa pointer to set NAT-T
  properties into cloned SA.
  
  PR:		223382
  MFC after:	1 week

Modified:
  head/sys/netipsec/key.c

Modified: head/sys/netipsec/key.c
==============================================================================
--- head/sys/netipsec/key.c	Fri Nov  3 10:27:22 2017	(r325354)
+++ head/sys/netipsec/key.c	Fri Nov  3 11:33:13 2017	(r325355)
@@ -5100,7 +5100,7 @@ key_updateaddresses(struct socket *so, struct mbuf *m,
 	newsav->natt = NULL;
 	newsav->sah = sah;
 	newsav->state = SADB_SASTATE_MATURE;
-	error = key_setnatt(sav, mhp);
+	error = key_setnatt(newsav, mhp);
 	if (error != 0)
 		goto fail;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711031133.vA3BXDBT014152>