Skip to content

Commit

Permalink
disable admin port better
Browse files Browse the repository at this point in the history
  • Loading branch information
itojun committed Sep 24, 2000
1 parent 2cfec05 commit ec16feb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions kame/kame/racoon/session.c
@@ -1,4 +1,4 @@
/* $KAME: session.c,v 1.13 2000/09/22 18:35:53 itojun Exp $ */
/* $KAME: session.c,v 1.14 2000/09/24 17:28:16 itojun Exp $ */

/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Expand Down Expand Up @@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* YIPS @(#)$Id: session.c,v 1.13 2000/09/22 18:35:53 itojun Exp $ */
/* YIPS @(#)$Id: session.c,v 1.14 2000/09/24 17:28:16 itojun Exp $ */

#include <sys/types.h>
#include <sys/param.h>
Expand Down Expand Up @@ -112,8 +112,10 @@ session(void)

FD_ZERO(&mask0);

#ifdef ENABLE_ADMINPORT
FD_SET(lcconf->sock_admin, &mask0);
nfds = (nfds > lcconf->sock_admin ? nfds : lcconf->sock_admin);
#endif
FD_SET(lcconf->sock_pfkey, &mask0);
nfds = (nfds > lcconf->sock_pfkey ? nfds : lcconf->sock_pfkey);
FD_SET(lcconf->rtsock, &mask0);
Expand Down Expand Up @@ -157,8 +159,10 @@ session(void)
/*NOTREACHED*/
}

#ifdef ENABLE_ADMINPORT
if (FD_ISSET(lcconf->sock_admin, &rfds))
admin_handler();
#endif

for (p = lcconf->myaddrs; p; p = p->next) {
if (!p->addr)
Expand All @@ -185,9 +189,11 @@ session(void)
FD_ZERO(&mask0);
nfds = 0;

#ifdef ENABLE_ADMINPORT
FD_SET(lcconf->sock_admin, &mask0);
nfds = (nfds > lcconf->sock_admin
? nfds : lcconf->sock_admin);
#endif
FD_SET(lcconf->sock_pfkey, &mask0);
nfds = (nfds > lcconf->sock_pfkey
? nfds : lcconf->sock_pfkey);
Expand Down Expand Up @@ -364,7 +370,9 @@ close_sockets()
{
isakmp_close();
pfkey_close(lcconf->sock_pfkey);
#ifdef ENABLE_ADMINPORT
(void)admin_close();
#endif
return 0;
}

0 comments on commit ec16feb

Please sign in to comment.