diff options
author | ae <ae@FreeBSD.org> | 2017-11-10 11:19:33 +0000 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2017-11-10 07:18:43 -0600 |
commit | 070f0aeb25ca4395acfc08a994071db3318c3c96 (patch) | |
tree | 153c933608d6f264ebaea51027fceecea91a294c | |
parent | eb0c0028f5c59e873d588592033ea8cd08ee98b6 (diff) | |
download | FreeBSD-src-070f0aeb25ca4395acfc08a994071db3318c3c96.zip FreeBSD-src-070f0aeb25ca4395acfc08a994071db3318c3c96.tar.gz |
MFC r325355:
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
(cherry picked from commit 847b00824ed795d29b483918686c7855f47b7297)
-rw-r--r-- | sys/netipsec/key.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 721cd2e..8cabbf6 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -5084,7 +5084,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; |