Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/dist/ipsec-tools/src/racoon From Roman Hoog Antink <r...
details: https://anonhg.NetBSD.org/src/rev/9c0aed906c82
branches: trunk
changeset: 761457:9c0aed906c82
user: tteras <tteras%NetBSD.org@localhost>
date: Fri Jan 28 13:02:34 2011 +0000
description:
>From Roman Hoog Antink <rha%open.ch@localhost>: Clean up sainfo reloading: rename
the functions, and remove unneeded global variable.
diffstat:
crypto/dist/ipsec-tools/src/racoon/sainfo.c | 11 +++++++----
crypto/dist/ipsec-tools/src/racoon/sainfo.h | 6 +++---
crypto/dist/ipsec-tools/src/racoon/session.c | 6 +++---
3 files changed, 13 insertions(+), 10 deletions(-)
diffs (83 lines):
diff -r e8cb87b4d37c -r 9c0aed906c82 crypto/dist/ipsec-tools/src/racoon/sainfo.c
--- a/crypto/dist/ipsec-tools/src/racoon/sainfo.c Fri Jan 28 13:00:14 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/sainfo.c Fri Jan 28 13:02:34 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sainfo.c,v 1.12 2010/01/17 23:03:01 wiz Exp $ */
+/* $NetBSD: sainfo.c,v 1.13 2011/01/28 13:02:34 tteras Exp $ */
/* $KAME: sainfo.c,v 1.16 2003/06/27 07:32:39 sakane Exp $ */
@@ -64,7 +64,8 @@
#include "sainfo.h"
#include "gcmalloc.h"
-static LIST_HEAD(_sitree, sainfo) sitree, sitree_save, sitree_tmp;
+typedef LIST_HEAD(_sitree, sainfo) sainfo_tailq_head_t;
+static sainfo_tailq_head_t sitree, sitree_save;
/* %%%
* modules for ipsec sa info
@@ -392,12 +393,14 @@
return buf;
}
-void save_sainfotree(void){
+void sainfo_start_reload(void){
sitree_save=sitree;
initsainfo();
}
-void save_sainfotree_flush(void){
+void sainfo_finish_reload(void){
+ sainfo_tailq_head_t sitree_tmp;
+
sitree_tmp=sitree;
sitree=sitree_save;
flushsainfo();
diff -r e8cb87b4d37c -r 9c0aed906c82 crypto/dist/ipsec-tools/src/racoon/sainfo.h
--- a/crypto/dist/ipsec-tools/src/racoon/sainfo.h Fri Jan 28 13:00:14 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/sainfo.h Fri Jan 28 13:02:34 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sainfo.h,v 1.6 2007/09/12 23:39:51 mgrooms Exp $ */
+/* $NetBSD: sainfo.h,v 1.7 2011/01/28 13:02:34 tteras Exp $ */
/* Id: sainfo.h,v 1.5 2006/07/09 17:19:38 manubsd Exp */
@@ -85,8 +85,8 @@
extern void inssainfoalg __P((struct sainfoalg **, struct sainfoalg *));
extern const char * sainfo2str __P((const struct sainfo *));
-extern void save_sainfotree __P((void));
-extern void save_sainfotree_flush __P((void));
+extern void sainfo_start_reload __P((void));
+extern void sainfo_finish_reload __P((void));
extern void save_sainfotree_restore __P((void));
#endif /* _SAINFO_H */
diff -r e8cb87b4d37c -r 9c0aed906c82 crypto/dist/ipsec-tools/src/racoon/session.c
--- a/crypto/dist/ipsec-tools/src/racoon/session.c Fri Jan 28 13:00:14 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/session.c Fri Jan 28 13:02:34 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: session.c,v 1.29 2011/01/28 13:00:14 tteras Exp $ */
+/* $NetBSD: session.c,v 1.30 2011/01/28 13:02:34 tteras Exp $ */
/* $KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $ */
@@ -387,7 +387,7 @@
}
#endif
- save_sainfotree();
+ sainfo_start_reload();
/* TODO: save / restore / flush old lcconf (?) / rmtree
*/
@@ -429,7 +429,7 @@
/* Update ctdtree ?
*/
- save_sainfotree_flush();
+ sainfo_finish_reload();
rmconf_finish_reload();
}
Home |
Main Index |
Thread Index |
Old Index