Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec Fix updating ipsec_used
details: https://anonhg.NetBSD.org/src/rev/af28a0577d0d
branches: trunk
changeset: 355544:af28a0577d0d
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Wed Aug 02 01:59:26 2017 +0000
description:
Fix updating ipsec_used
- key_update_used wasn't called in key_api_spddelete2 and key_api_spdflush
- key_update_used wasn't called if an SP had been added/deleted but
a reply to userland failed
diffstat:
sys/netipsec/key.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (52 lines):
diff -r 033d7f09ec58 -r af28a0577d0d sys/netipsec/key.c
--- a/sys/netipsec/key.c Wed Aug 02 01:28:02 2017 +0000
+++ b/sys/netipsec/key.c Wed Aug 02 01:59:26 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.197 2017/08/02 01:28:03 ozaki-r Exp $ */
+/* $NetBSD: key.c,v 1.198 2017/08/02 01:59:26 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.197 2017/08/02 01:28:03 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.198 2017/08/02 01:59:26 ozaki-r Exp $");
/*
* This code is referd to RFC 2367
@@ -1362,6 +1362,8 @@
localcount_fini(&sp->localcount);
key_free_sp(sp);
+
+ key_update_used();
}
void
@@ -2028,6 +2030,8 @@
#endif /* INET6 */
#endif /* GATEWAY */
+ key_update_used();
+
{
struct mbuf *n, *mpolicy;
int off;
@@ -2064,7 +2068,6 @@
xpl->sadb_x_policy_id = newsp->id;
m_freem(m);
- key_update_used();
return key_sendup_mbuf(so, n, KEY_SENDUP_ALL);
}
}
@@ -2177,7 +2180,6 @@
return key_senderror(so, m, ENOBUFS);
m_freem(m);
- key_update_used();
return key_sendup_mbuf(so, n, KEY_SENDUP_ALL);
}
}
Home |
Main Index |
Thread Index |
Old Index