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 check if we got RMCONF_ER...



details:   https://anonhg.NetBSD.org/src/rev/87c032dc5412
branches:  trunk
changeset: 763223:87c032dc5412
user:      vanhu <vanhu%NetBSD.org@localhost>
date:      Mon Mar 14 09:19:23 2011 +0000

description:
check if we got RMCONF_ERR_MULTIPLE from getrmconf_by_ph1() in revalidate_ph1tree_rmconf()

diffstat:

 crypto/dist/ipsec-tools/src/racoon/handler.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r f31369dcf1a0 -r 87c032dc5412 crypto/dist/ipsec-tools/src/racoon/handler.c
--- a/crypto/dist/ipsec-tools/src/racoon/handler.c      Mon Mar 14 08:49:29 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/handler.c      Mon Mar 14 09:19:23 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: handler.c,v 1.36 2011/03/11 14:30:07 vanhu Exp $       */
+/*     $NetBSD: handler.c,v 1.37 2011/03/14 09:19:23 vanhu Exp $       */
 
 /* Id: handler.c,v 1.28 2006/05/26 12:17:29 manubsd Exp */
 
@@ -1486,6 +1486,7 @@
 static int revalidate_ph1tree_rmconf(void)
 {
        struct ph1handle *p, *next;
+       struct remoteconf *rmconf;
 
        for (p = LIST_FIRST(&ph1tree); p; p = next) {
                next = LIST_NEXT(p, chain);
@@ -1495,9 +1496,11 @@
                if (p->rmconf == NULL)
                        continue;
 
-               p->rmconf = getrmconf_by_ph1(p);
-               if (p->rmconf == NULL || p->rmconf == RMCONF_ERR_MULTIPLE)
+               rmconf = getrmconf_by_ph1(p);
+               if (rmconf == NULL || rmconf == RMCONF_ERR_MULTIPLE)
                        remove_ph1(p);
+               else
+                       p->rmconf = rmconf;
        }
 
        return 1;



Home | Main Index | Thread Index | Old Index