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 Make "Mode Config" work i...



details:   https://anonhg.NetBSD.org/src/rev/7fe6e909b64a
branches:  trunk
changeset: 584499:7fe6e909b64a
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Sep 21 12:46:08 2005 +0000

description:
Make "Mode Config" work if XAuth is not used.

diffstat:

 crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 07ac2166cc1c -r 7fe6e909b64a crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
--- a/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c   Wed Sep 21 12:24:11 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c   Wed Sep 21 12:46:08 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isakmp_cfg.c,v 1.7 2005/08/20 00:57:06 manu Exp $      */
+/*     $NetBSD: isakmp_cfg.c,v 1.8 2005/09/21 12:46:08 tron Exp $      */
 
 /* Id: isakmp_cfg.c,v 1.26.2.5 2005/05/10 09:45:46 manubsd Exp */
 
@@ -730,6 +730,12 @@
                        /* FALLTHROUGH */
 #endif
                case ISAKMP_CFG_CONF_LOCAL:
+                       if (isakmp_cfg_getport(iph1) == -1) {
+                               plog(LLV_ERROR, LOCATION, NULL, 
+                                   "Port pool depleted\n");
+                               break;
+                       }
+
                        iph1->mode_cfg->addr4.s_addr = 
                            htonl(ntohl(isakmp_cfg_config.network4) 
                            + iph1->mode_cfg->port);
@@ -1157,6 +1163,9 @@
        unsigned int i;
        size_t size = isakmp_cfg_config.pool_size;
 
+       if (iph1->mode_cfg->flags & ISAKMP_CFG_PORT_ALLOCATED)
+               return iph1->mode_cfg->port;
+
        if (isakmp_cfg_config.port_pool == NULL) {
                plog(LLV_ERROR, LOCATION, NULL,
                    "isakmp_cfg_config.port_pool == NULL\n");



Home | Main Index | Thread Index | Old Index