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/e8cb87b4d37c
branches:  trunk
changeset: 761456:e8cb87b4d37c
user:      tteras <tteras%NetBSD.org@localhost>
date:      Fri Jan 28 13:00:14 2011 +0000

description:
>From Roman Hoog Antink <rha%open.ch@localhost>: Clean up rmconf reloading: rename
the functions, and remove unneeded global variable.

diffstat:

 crypto/dist/ipsec-tools/src/racoon/remoteconf.c |  11 +++++++----
 crypto/dist/ipsec-tools/src/racoon/remoteconf.h |   6 +++---
 crypto/dist/ipsec-tools/src/racoon/session.c    |   7 +++----
 3 files changed, 13 insertions(+), 11 deletions(-)

diffs (87 lines):

diff -r f759704c230c -r e8cb87b4d37c crypto/dist/ipsec-tools/src/racoon/remoteconf.c
--- a/crypto/dist/ipsec-tools/src/racoon/remoteconf.c   Fri Jan 28 12:51:40 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/remoteconf.c   Fri Jan 28 13:00:14 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: remoteconf.c,v 1.21 2010/09/08 12:18:35 vanhu Exp $    */
+/*     $NetBSD: remoteconf.c,v 1.22 2011/01/28 13:00:14 tteras Exp $   */
 
 /* Id: remoteconf.c,v 1.38 2006/05/06 15:52:44 manubsd Exp */
 
@@ -79,7 +79,8 @@
 #include "handler.h"
 #include "genlist.h"
 
-static TAILQ_HEAD(_rmtree, remoteconf) rmtree, rmtree_save, rmtree_tmp;
+typedef TAILQ_HEAD(_rmtree, remoteconf) remoteconf_tailq_head_t;
+static remoteconf_tailq_head_t rmtree, rmtree_save;
 
 /*
  * Script hook names and script hook paths
@@ -744,15 +745,17 @@
 }
 
 void
-save_rmconf()
+rmconf_start_reload()
 {
        rmtree_save=rmtree;
        initrmconf();
 }
 
 void
-save_rmconf_flush()
+rmconf_finish_reload()
 {
+       remoteconf_tailq_head_t rmtree_tmp;
+
        rmtree_tmp=rmtree;
        rmtree=rmtree_save;
        flushrmconf();
diff -r f759704c230c -r e8cb87b4d37c crypto/dist/ipsec-tools/src/racoon/remoteconf.h
--- a/crypto/dist/ipsec-tools/src/racoon/remoteconf.h   Fri Jan 28 12:51:40 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/remoteconf.h   Fri Jan 28 13:00:14 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: remoteconf.h,v 1.12 2010/06/22 09:41:33 vanhu Exp $    */
+/*     $NetBSD: remoteconf.h,v 1.13 2011/01/28 13:00:14 tteras Exp $   */
 
 /* Id: remoteconf.h,v 1.26 2006/05/06 15:52:44 manubsd Exp */
 
@@ -209,8 +209,8 @@
 extern void remrmconf __P((struct remoteconf *));
 extern void flushrmconf __P((void));
 extern void initrmconf __P((void));
-extern void save_rmconf __P((void));
-extern void save_rmconf_flush __P((void));
+extern void rmconf_start_reload __P((void));
+extern void rmconf_finish_reload __P((void));
 
 extern int check_etypeok __P((struct remoteconf *, void *));
 
diff -r f759704c230c -r e8cb87b4d37c crypto/dist/ipsec-tools/src/racoon/session.c
--- a/crypto/dist/ipsec-tools/src/racoon/session.c      Fri Jan 28 12:51:40 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/session.c      Fri Jan 28 13:00:14 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: session.c,v 1.28 2010/10/21 06:15:28 tteras Exp $      */
+/*     $NetBSD: session.c,v 1.29 2011/01/28 13:00:14 tteras Exp $      */
 
 /*     $KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $        */
 
@@ -391,8 +391,7 @@
 
        /* TODO: save / restore / flush old lcconf (?) / rmtree
         */
-       save_rmconf();
-       initrmconf();
+       rmconf_start_reload();
 
 #ifdef HAVE_LIBRADIUS
        /* free and init radius configuration */
@@ -431,7 +430,7 @@
         */
 
        save_sainfotree_flush();
-       save_rmconf_flush();
+       rmconf_finish_reload();
 }
 
 static void



Home | Main Index | Thread Index | Old Index