Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec Rename local variable newsah to sah
details: https://anonhg.NetBSD.org/src/rev/3edbecec014c
branches: trunk
changeset: 355564:3edbecec014c
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Aug 03 06:31:16 2017 +0000
description:
Rename local variable newsah to sah
It may not be new.
diffstat:
sys/netipsec/key.c | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diffs (121 lines):
diff -r 690617773347 -r 3edbecec014c sys/netipsec/key.c
--- a/sys/netipsec/key.c Thu Aug 03 06:30:40 2017 +0000
+++ b/sys/netipsec/key.c Thu Aug 03 06:31:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.203 2017/08/03 06:30:40 ozaki-r Exp $ */
+/* $NetBSD: key.c,v 1.204 2017/08/03 06:31:16 ozaki-r Exp $ */
/* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */
/* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.203 2017/08/03 06:30:40 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.204 2017/08/03 06:31:16 ozaki-r Exp $");
/*
* This code is referd to RFC 2367
@@ -4884,7 +4884,7 @@
{
const struct sockaddr *src, *dst;
struct secasindex saidx;
- struct secashead *newsah;
+ struct secashead *sah;
struct secasvar *newsav;
u_int8_t proto;
u_int32_t spi;
@@ -4936,11 +4936,11 @@
return key_senderror(so, m, EINVAL);
/* get a SA index */
- newsah = key_getsah(&saidx, CMP_REQID);
- if (newsah == NULL) {
+ sah = key_getsah(&saidx, CMP_REQID);
+ if (sah == NULL) {
/* create a new SA index */
- newsah = key_newsah(&saidx);
- if (newsah == NULL) {
+ sah = key_newsah(&saidx);
+ if (sah == NULL) {
IPSECLOG(LOG_DEBUG, "No more memory.\n");
return key_senderror(so, m, ENOBUFS);
}
@@ -4959,11 +4959,11 @@
/* add to satree */
newsav->refcnt = 1;
- newsav->sah = newsah;
+ newsav->sah = sah;
newsav->state = SADB_SASTATE_LARVAL;
SAVLIST_ENTRY_INIT(newsav);
- SAVLIST_WRITER_INSERT_TAIL(newsah, SADB_SASTATE_LARVAL, newsav);
- key_validate_savlist(newsah, SADB_SASTATE_LARVAL);
+ SAVLIST_WRITER_INSERT_TAIL(sah, SADB_SASTATE_LARVAL, newsav);
+ key_validate_savlist(sah, SADB_SASTATE_LARVAL);
#ifndef IPSEC_NONBLOCK_ACQUIRE
/* delete the entry in acqtree */
@@ -5482,7 +5482,7 @@
struct sadb_sa *sa0;
const struct sockaddr *src, *dst;
struct secasindex saidx;
- struct secashead *newsah;
+ struct secashead *sah;
struct secasvar *newsav;
u_int16_t proto;
u_int8_t mode;
@@ -5538,11 +5538,11 @@
return key_senderror(so, m, EINVAL);
/* get a SA header */
- newsah = key_getsah(&saidx, CMP_REQID);
- if (newsah == NULL) {
+ sah = key_getsah(&saidx, CMP_REQID);
+ if (sah == NULL) {
/* create a new SA header */
- newsah = key_newsah(&saidx);
- if (newsah == NULL) {
+ sah = key_newsah(&saidx);
+ if (sah == NULL) {
IPSECLOG(LOG_DEBUG, "No more memory.\n");
return key_senderror(so, m, ENOBUFS);
}
@@ -5550,7 +5550,7 @@
/* set spidx if there */
/* XXX rewrite */
- error = key_setident(newsah, m, mhp);
+ error = key_setident(sah, m, mhp);
if (error) {
return key_senderror(so, m, error);
}
@@ -5559,7 +5559,7 @@
struct secasvar *sav;
/* We can create new SA only if SPI is differenct. */
- sav = key_getsavbyspi(newsah, sa0->sadb_sa_spi);
+ sav = key_getsavbyspi(sah, sa0->sadb_sa_spi);
if (sav != NULL) {
KEY_FREESAV(&sav);
IPSECLOG(LOG_DEBUG, "SA already exists.\n");
@@ -5572,7 +5572,7 @@
if (newsav == NULL) {
return key_senderror(so, m, error);
}
- newsav->sah = newsah;
+ newsav->sah = sah;
error = key_handle_natt_info(newsav, mhp);
if (error != 0) {
@@ -5590,8 +5590,8 @@
newsav->refcnt = 1;
newsav->state = SADB_SASTATE_MATURE;
SAVLIST_ENTRY_INIT(newsav);
- SAVLIST_WRITER_INSERT_TAIL(newsah, SADB_SASTATE_MATURE, newsav);
- key_validate_savlist(newsah, SADB_SASTATE_MATURE);
+ SAVLIST_WRITER_INSERT_TAIL(sah, SADB_SASTATE_MATURE, newsav);
+ key_validate_savlist(sah, SADB_SASTATE_MATURE);
/*
* don't call key_freesav() here, as we would like to keep the SA
Home |
Main Index |
Thread Index |
Old Index