Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/crypto/dist/ipsec-tools/src/racoon Pull up revision 1.2 (...



details:   https://anonhg.NetBSD.org/src/rev/f4c46b3f1183
branches:  netbsd-3
changeset: 576607:f4c46b3f1183
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Jul 12 17:37:35 2005 +0000

description:
Pull up revision 1.2 (requested by manu in ticket #581):
Don't use adminport when it is disabled

diffstat:

 crypto/dist/ipsec-tools/src/racoon/session.c |  27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diffs (49 lines):

diff -r af19928116e2 -r f4c46b3f1183 crypto/dist/ipsec-tools/src/racoon/session.c
--- a/crypto/dist/ipsec-tools/src/racoon/session.c      Tue Jul 12 17:33:50 2005 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/session.c      Tue Jul 12 17:37:35 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: session.c,v 1.1.1.2 2005/02/23 14:54:27 manu Exp $     */
+/*     $NetBSD: session.c,v 1.1.1.2.2.1 2005/07/12 17:37:35 tron Exp $ */
 
 /*     $KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $        */
 
@@ -168,7 +168,8 @@
                }
 
 #ifdef ENABLE_ADMINPORT
-               if (FD_ISSET(lcconf->sock_admin, &rfds))
+               if ((lcconf->sock_admin != -1) &&
+                   (FD_ISSET(lcconf->sock_admin, &rfds)))
                        admin_handler();
 #endif
 
@@ -226,17 +227,19 @@
        FD_ZERO(&maskdying);
 
 #ifdef ENABLE_ADMINPORT
-       if (lcconf->sock_admin >= FD_SETSIZE) {
-               plog(LLV_ERROR, LOCATION, NULL, "fd_set overrun\n");
-               exit(1);
+       if (lcconf->sock_admin != -1) {
+               if (lcconf->sock_admin >= FD_SETSIZE) {
+                       plog(LLV_ERROR, LOCATION, NULL, "fd_set overrun\n");
+                       exit(1);
+               }
+               FD_SET(lcconf->sock_admin, &mask0);
+               /* XXX should we listen on admin socket when dying ?
+                */
+#if 0
+               FD_SET(lcconf->sock_admin, &maskdying);
+#endif
+               nfds = (nfds > lcconf->sock_admin ? nfds : lcconf->sock_admin);
        }
-       FD_SET(lcconf->sock_admin, &mask0);
-       /* XXX should we listen on admin socket when dying ?
-        */
-#if 0
-       FD_SET(lcconf->sock_admin, &maskdying);
-#endif
-       nfds = (nfds > lcconf->sock_admin ? nfds : lcconf->sock_admin);
 #endif
        if (lcconf->sock_pfkey >= FD_SETSIZE) {
                plog(LLV_ERROR, LOCATION, NULL, "fd_set overrun\n");



Home | Main Index | Thread Index | Old Index