| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: session.c,v 1.17 2008/10/23 10:56:10 tteras Exp $ */ | | 1 | /* $NetBSD: session.c,v 1.18 2008/10/27 06:18:09 tteras Exp $ */ |
2 | | | 2 | |
3 | /* $KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $ */ | | 3 | /* $KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $ */ |
4 | | | 4 | |
5 | /* | | 5 | /* |
6 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | | 6 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
7 | * All rights reserved. | | 7 | * All rights reserved. |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -224,28 +224,26 @@ session(void) | | | @@ -224,28 +224,26 @@ session(void) |
224 | for (p = lcconf->myaddrs; p; p = p->next) { | | 224 | for (p = lcconf->myaddrs; p; p = p->next) { |
225 | if (!p->addr) | | 225 | if (!p->addr) |
226 | continue; | | 226 | continue; |
227 | if (FD_ISSET(p->sock, &rfds)) | | 227 | if (FD_ISSET(p->sock, &rfds)) |
228 | isakmp_handler(p->sock); | | 228 | isakmp_handler(p->sock); |
229 | } | | 229 | } |
230 | | | 230 | |
231 | if (FD_ISSET(lcconf->sock_pfkey, &rfds)) | | 231 | if (FD_ISSET(lcconf->sock_pfkey, &rfds)) |
232 | pfkey_handler(); | | 232 | pfkey_handler(); |
233 | | | 233 | |
234 | if (lcconf->rtsock >= 0 && FD_ISSET(lcconf->rtsock, &rfds)) { | | 234 | if (lcconf->rtsock >= 0 && FD_ISSET(lcconf->rtsock, &rfds)) { |
235 | if (update_myaddrs() && lcconf->autograbaddr) | | 235 | if (update_myaddrs() && lcconf->autograbaddr) |
236 | check_rtsock(NULL); | | 236 | check_rtsock(NULL); |
237 | else | | | |
238 | initfds(); | | | |
239 | } | | 237 | } |
240 | } | | 238 | } |
241 | } | | 239 | } |
242 | | | 240 | |
243 | /* clear all status and exit program. */ | | 241 | /* clear all status and exit program. */ |
244 | static void | | 242 | static void |
245 | close_session() | | 243 | close_session() |
246 | { | | 244 | { |
247 | #ifdef ENABLE_FASTQUIT | | 245 | #ifdef ENABLE_FASTQUIT |
248 | flushph2(); | | 246 | flushph2(); |
249 | #endif | | 247 | #endif |
250 | flushph1(); | | 248 | flushph1(); |
251 | close_sockets(); | | 249 | close_sockets(); |