]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/pppoe/discovery.c
Use autoconf/automake to configure and make ppp
[ppp.git] / pppd / plugins / pppoe / discovery.c
1 /***********************************************************************
2 *
3 * discovery.c
4 *
5 * Perform PPPoE discovery
6 *
7 * Copyright (C) 1999 by Roaring Penguin Software Inc.
8 *
9 ***********************************************************************/
10
11 static char const RCSID[] =
12 "$Id: discovery.c,v 1.6 2008/06/15 04:35:50 paulus Exp $";
13
14 #ifdef HAVE_CONFIG_H
15 #include <config.h>
16 #endif
17
18 #define _GNU_SOURCE 1
19 #include "pppoe.h"
20 #include "pppd/pppd.h"
21 #include "pppd/fsm.h"
22 #include "pppd/lcp.h"
23
24 #include <string.h>
25 #include <stdlib.h>
26 #include <errno.h>
27
28 #ifdef HAVE_SYS_TIME_H
29 #include <sys/time.h>
30 #endif
31
32 #ifdef HAVE_SYS_UIO_H
33 #include <sys/uio.h>
34 #endif
35
36 #ifdef HAVE_UNISTD_H
37 #include <unistd.h>
38 #endif
39
40 #ifdef USE_LINUX_PACKET
41 #include <sys/ioctl.h>
42 #include <fcntl.h>
43 #endif
44
45 #include <signal.h>
46
47 /* Calculate time remaining until *exp, return 0 if now >= *exp */
48 static int time_left(struct timeval *diff, struct timeval *exp)
49 {
50     struct timeval now;
51
52     if (get_time(&now) < 0) {
53         error("get_time: %m");
54         return 0;
55     }
56
57     if (now.tv_sec > exp->tv_sec
58         || (now.tv_sec == exp->tv_sec && now.tv_usec >= exp->tv_usec))
59         return 0;
60
61     diff->tv_sec = exp->tv_sec - now.tv_sec;
62     diff->tv_usec = exp->tv_usec - now.tv_usec;
63     if (diff->tv_usec < 0) {
64         diff->tv_usec += 1000000;
65         --diff->tv_sec;
66     }
67
68     return 1;
69 }
70
71 /**********************************************************************
72 *%FUNCTION: parseForHostUniq
73 *%ARGUMENTS:
74 * type -- tag type
75 * len -- tag length
76 * data -- tag data.
77 * extra -- user-supplied pointer.  This is assumed to be a pointer to int.
78 *%RETURNS:
79 * Nothing
80 *%DESCRIPTION:
81 * If a HostUnique tag is found which matches our PID, sets *extra to 1.
82 ***********************************************************************/
83 static void
84 parseForHostUniq(UINT16_t type, UINT16_t len, unsigned char *data,
85                  void *extra)
86 {
87     PPPoETag *tag = extra;
88
89     if (type == TAG_HOST_UNIQ && len == ntohs(tag->length))
90         tag->length = memcmp(data, tag->payload, len);
91 }
92
93 /**********************************************************************
94 *%FUNCTION: packetIsForMe
95 *%ARGUMENTS:
96 * conn -- PPPoE connection info
97 * packet -- a received PPPoE packet
98 *%RETURNS:
99 * 1 if packet is for this PPPoE daemon; 0 otherwise.
100 *%DESCRIPTION:
101 * If we are using the Host-Unique tag, verifies that packet contains
102 * our unique identifier.
103 ***********************************************************************/
104 static int
105 packetIsForMe(PPPoEConnection *conn, PPPoEPacket *packet)
106 {
107     PPPoETag hostUniq = conn->hostUniq;
108
109     /* If packet is not directed to our MAC address, forget it */
110     if (memcmp(packet->ethHdr.h_dest, conn->myEth, ETH_ALEN)) return 0;
111
112     /* If we're not using the Host-Unique tag, then accept the packet */
113     if (!conn->hostUniq.length) return 1;
114
115     parsePacket(packet, parseForHostUniq, &hostUniq);
116     return !hostUniq.length;
117 }
118
119 /**********************************************************************
120 *%FUNCTION: parsePADOTags
121 *%ARGUMENTS:
122 * type -- tag type
123 * len -- tag length
124 * data -- tag data
125 * extra -- extra user data.  Should point to a PacketCriteria structure
126 *          which gets filled in according to selected AC name and service
127 *          name.
128 *%RETURNS:
129 * Nothing
130 *%DESCRIPTION:
131 * Picks interesting tags out of a PADO packet
132 ***********************************************************************/
133 static void
134 parsePADOTags(UINT16_t type, UINT16_t len, unsigned char *data,
135               void *extra)
136 {
137     struct PacketCriteria *pc = (struct PacketCriteria *) extra;
138     PPPoEConnection *conn = pc->conn;
139     UINT16_t mru;
140     int i;
141
142     switch(type) {
143     case TAG_AC_NAME:
144         pc->seenACName = 1;
145         if (conn->printACNames) {
146             info("Access-Concentrator: %.*s", (int) len, data);
147         }
148         if (conn->acName && len == strlen(conn->acName) &&
149             !strncmp((char *) data, conn->acName, len)) {
150             pc->acNameOK = 1;
151         }
152         break;
153     case TAG_SERVICE_NAME:
154         pc->seenServiceName = 1;
155         if (conn->serviceName && len == strlen(conn->serviceName) &&
156             !strncmp((char *) data, conn->serviceName, len)) {
157             pc->serviceNameOK = 1;
158         }
159         break;
160     case TAG_AC_COOKIE:
161         conn->cookie.type = htons(type);
162         conn->cookie.length = htons(len);
163         memcpy(conn->cookie.payload, data, len);
164         break;
165     case TAG_RELAY_SESSION_ID:
166         conn->relayId.type = htons(type);
167         conn->relayId.length = htons(len);
168         memcpy(conn->relayId.payload, data, len);
169         break;
170     case TAG_PPP_MAX_PAYLOAD:
171         if (len == sizeof(mru)) {
172             memcpy(&mru, data, sizeof(mru));
173             mru = ntohs(mru);
174             if (mru >= ETH_PPPOE_MTU) {
175                 if (lcp_allowoptions[0].mru > mru)
176                     lcp_allowoptions[0].mru = mru;
177                 if (lcp_wantoptions[0].mru > mru)
178                     lcp_wantoptions[0].mru = mru;
179                 conn->seenMaxPayload = 1;
180             }
181         }
182         break;
183     case TAG_SERVICE_NAME_ERROR:
184         error("PADO: Service-Name-Error: %.*s", (int) len, data);
185         conn->error = 1;
186         break;
187     case TAG_AC_SYSTEM_ERROR:
188         error("PADO: System-Error: %.*s", (int) len, data);
189         conn->error = 1;
190         break;
191     case TAG_GENERIC_ERROR:
192         error("PADO: Generic-Error: %.*s", (int) len, data);
193         conn->error = 1;
194         break;
195     }
196 }
197
198 /**********************************************************************
199 *%FUNCTION: parsePADSTags
200 *%ARGUMENTS:
201 * type -- tag type
202 * len -- tag length
203 * data -- tag data
204 * extra -- extra user data (pointer to PPPoEConnection structure)
205 *%RETURNS:
206 * Nothing
207 *%DESCRIPTION:
208 * Picks interesting tags out of a PADS packet
209 ***********************************************************************/
210 static void
211 parsePADSTags(UINT16_t type, UINT16_t len, unsigned char *data,
212               void *extra)
213 {
214     PPPoEConnection *conn = (PPPoEConnection *) extra;
215     UINT16_t mru;
216     switch(type) {
217     case TAG_SERVICE_NAME:
218         dbglog("PADS: Service-Name: '%.*s'", (int) len, data);
219         break;
220     case TAG_PPP_MAX_PAYLOAD:
221         if (len == sizeof(mru)) {
222             memcpy(&mru, data, sizeof(mru));
223             mru = ntohs(mru);
224             if (mru >= ETH_PPPOE_MTU) {
225                 if (lcp_allowoptions[0].mru > mru)
226                     lcp_allowoptions[0].mru = mru;
227                 if (lcp_wantoptions[0].mru > mru)
228                     lcp_wantoptions[0].mru = mru;
229                 conn->seenMaxPayload = 1;
230             }
231         }
232         break;
233     case TAG_SERVICE_NAME_ERROR:
234         error("PADS: Service-Name-Error: %.*s", (int) len, data);
235         conn->error = 1;
236         break;
237     case TAG_AC_SYSTEM_ERROR:
238         error("PADS: System-Error: %.*s", (int) len, data);
239         conn->error = 1;
240         break;
241     case TAG_GENERIC_ERROR:
242         error("PADS: Generic-Error: %.*s", (int) len, data);
243         conn->error = 1;
244         break;
245     case TAG_RELAY_SESSION_ID:
246         conn->relayId.type = htons(type);
247         conn->relayId.length = htons(len);
248         memcpy(conn->relayId.payload, data, len);
249         break;
250     }
251 }
252
253 /***********************************************************************
254 *%FUNCTION: sendPADI
255 *%ARGUMENTS:
256 * conn -- PPPoEConnection structure
257 *%RETURNS:
258 * Nothing
259 *%DESCRIPTION:
260 * Sends a PADI packet
261 ***********************************************************************/
262 static void
263 sendPADI(PPPoEConnection *conn)
264 {
265     PPPoEPacket packet;
266     unsigned char *cursor = packet.payload;
267     PPPoETag *svc = (PPPoETag *) (&packet.payload);
268     UINT16_t namelen = 0;
269     UINT16_t plen;
270     int omit_service_name = 0;
271
272     if (conn->serviceName) {
273         namelen = (UINT16_t) strlen(conn->serviceName);
274         if (!strcmp(conn->serviceName, "NO-SERVICE-NAME-NON-RFC-COMPLIANT")) {
275             omit_service_name = 1;
276         }
277     }
278
279     /* Set destination to Ethernet broadcast address */
280     memset(packet.ethHdr.h_dest, 0xFF, ETH_ALEN);
281     memcpy(packet.ethHdr.h_source, conn->myEth, ETH_ALEN);
282
283     packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery);
284     packet.vertype = PPPOE_VER_TYPE(1, 1);
285     packet.code = CODE_PADI;
286     packet.session = 0;
287
288     if (!omit_service_name) {
289         plen = TAG_HDR_SIZE + namelen;
290         CHECK_ROOM(cursor, packet.payload, plen);
291
292         svc->type = TAG_SERVICE_NAME;
293         svc->length = htons(namelen);
294
295         if (conn->serviceName) {
296             memcpy(svc->payload, conn->serviceName, strlen(conn->serviceName));
297         }
298         cursor += namelen + TAG_HDR_SIZE;
299     } else {
300         plen = 0;
301     }
302
303     /* If we're using Host-Uniq, copy it over */
304     if (conn->hostUniq.length) {
305         int len = ntohs(conn->hostUniq.length);
306         CHECK_ROOM(cursor, packet.payload, len + TAG_HDR_SIZE);
307         memcpy(cursor, &conn->hostUniq, len + TAG_HDR_SIZE);
308         cursor += len + TAG_HDR_SIZE;
309         plen += len + TAG_HDR_SIZE;
310     }
311
312     /* Add our maximum MTU/MRU */
313     if (MIN(lcp_allowoptions[0].mru, lcp_wantoptions[0].mru) > ETH_PPPOE_MTU) {
314         PPPoETag maxPayload;
315         UINT16_t mru = htons(MIN(lcp_allowoptions[0].mru, lcp_wantoptions[0].mru));
316         maxPayload.type = htons(TAG_PPP_MAX_PAYLOAD);
317         maxPayload.length = htons(sizeof(mru));
318         memcpy(maxPayload.payload, &mru, sizeof(mru));
319         CHECK_ROOM(cursor, packet.payload, sizeof(mru) + TAG_HDR_SIZE);
320         memcpy(cursor, &maxPayload, sizeof(mru) + TAG_HDR_SIZE);
321         cursor += sizeof(mru) + TAG_HDR_SIZE;
322         plen += sizeof(mru) + TAG_HDR_SIZE;
323     }
324
325     packet.length = htons(plen);
326
327     sendPacket(conn, conn->discoverySocket, &packet, (int) (plen + HDR_SIZE));
328 }
329
330 /**********************************************************************
331 *%FUNCTION: waitForPADO
332 *%ARGUMENTS:
333 * conn -- PPPoEConnection structure
334 * timeout -- how long to wait (in seconds)
335 *%RETURNS:
336 * Nothing
337 *%DESCRIPTION:
338 * Waits for a PADO packet and copies useful information
339 ***********************************************************************/
340 void
341 waitForPADO(PPPoEConnection *conn, int timeout)
342 {
343     fd_set readable;
344     int r;
345     struct timeval tv;
346     struct timeval expire_at;
347
348     PPPoEPacket packet;
349     int len;
350
351     struct PacketCriteria pc;
352     pc.conn          = conn;
353     pc.acNameOK      = (conn->acName)      ? 0 : 1;
354     pc.serviceNameOK = (conn->serviceName) ? 0 : 1;
355     pc.seenACName    = 0;
356     pc.seenServiceName = 0;
357     conn->seenMaxPayload = 0;
358     conn->error = 0;
359
360     if (get_time(&expire_at) < 0) {
361         error("get_time (waitForPADO): %m");
362         return;
363     }
364     expire_at.tv_sec += timeout;
365
366     do {
367         if (BPF_BUFFER_IS_EMPTY) {
368             if (!time_left(&tv, &expire_at))
369                 return;         /* Timed out */
370
371             FD_ZERO(&readable);
372             FD_SET(conn->discoverySocket, &readable);
373
374             while(1) {
375                 r = select(conn->discoverySocket+1, &readable, NULL, NULL, &tv);
376                 if (r >= 0 || errno != EINTR || got_sigterm) break;
377             }
378             if (r < 0) {
379                 error("select (waitForPADO): %m");
380                 return;
381             }
382             if (r == 0)
383                 return;         /* Timed out */
384         }
385
386         /* Get the packet */
387         receivePacket(conn->discoverySocket, &packet, &len);
388
389         /* Check length */
390         if (ntohs(packet.length) + HDR_SIZE > len) {
391             error("Bogus PPPoE length field (%u)",
392                    (unsigned int) ntohs(packet.length));
393             continue;
394         }
395
396 #ifdef USE_BPF
397         /* If it's not a Discovery packet, loop again */
398         if (etherType(&packet) != Eth_PPPOE_Discovery) continue;
399 #endif
400
401         /* If it's not for us, loop again */
402         if (!packetIsForMe(conn, &packet)) continue;
403
404         if (packet.code == CODE_PADO) {
405             if (NOT_UNICAST(packet.ethHdr.h_source)) {
406                 error("Ignoring PADO packet from non-unicast MAC address");
407                 continue;
408             }
409             if (conn->req_peer
410                 && memcmp(packet.ethHdr.h_source, conn->req_peer_mac, ETH_ALEN) != 0) {
411                 warn("Ignoring PADO packet from wrong MAC address");
412                 continue;
413             }
414             if (parsePacket(&packet, parsePADOTags, &pc) < 0)
415                 return;
416             if (conn->error)
417                 return;
418             if (!pc.seenACName) {
419                 error("Ignoring PADO packet with no AC-Name tag");
420                 continue;
421             }
422             if (!pc.seenServiceName) {
423                 error("Ignoring PADO packet with no Service-Name tag");
424                 continue;
425             }
426             conn->numPADOs++;
427             if (pc.acNameOK && pc.serviceNameOK) {
428                 memcpy(conn->peerEth, packet.ethHdr.h_source, ETH_ALEN);
429                 conn->discoveryState = STATE_RECEIVED_PADO;
430                 break;
431             }
432         }
433     } while (conn->discoveryState != STATE_RECEIVED_PADO);
434 }
435
436 /***********************************************************************
437 *%FUNCTION: sendPADR
438 *%ARGUMENTS:
439 * conn -- PPPoE connection structur
440 *%RETURNS:
441 * Nothing
442 *%DESCRIPTION:
443 * Sends a PADR packet
444 ***********************************************************************/
445 static void
446 sendPADR(PPPoEConnection *conn)
447 {
448     PPPoEPacket packet;
449     PPPoETag *svc = (PPPoETag *) packet.payload;
450     unsigned char *cursor = packet.payload;
451
452     UINT16_t namelen = 0;
453     UINT16_t plen;
454
455     if (conn->serviceName) {
456         namelen = (UINT16_t) strlen(conn->serviceName);
457     }
458     plen = TAG_HDR_SIZE + namelen;
459     CHECK_ROOM(cursor, packet.payload, plen);
460
461     memcpy(packet.ethHdr.h_dest, conn->peerEth, ETH_ALEN);
462     memcpy(packet.ethHdr.h_source, conn->myEth, ETH_ALEN);
463
464     packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery);
465     packet.vertype = PPPOE_VER_TYPE(1, 1);
466     packet.code = CODE_PADR;
467     packet.session = 0;
468
469     svc->type = TAG_SERVICE_NAME;
470     svc->length = htons(namelen);
471     if (conn->serviceName) {
472         memcpy(svc->payload, conn->serviceName, namelen);
473     }
474     cursor += namelen + TAG_HDR_SIZE;
475
476     /* If we're using Host-Uniq, copy it over */
477     if (conn->hostUniq.length) {
478         int len = ntohs(conn->hostUniq.length);
479         CHECK_ROOM(cursor, packet.payload, len+TAG_HDR_SIZE);
480         memcpy(cursor, &conn->hostUniq, len + TAG_HDR_SIZE);
481         cursor += len + TAG_HDR_SIZE;
482         plen += len + TAG_HDR_SIZE;
483     }
484
485     /* Add our maximum MTU/MRU */
486     if (MIN(lcp_allowoptions[0].mru, lcp_wantoptions[0].mru) > ETH_PPPOE_MTU) {
487         PPPoETag maxPayload;
488         UINT16_t mru = htons(MIN(lcp_allowoptions[0].mru, lcp_wantoptions[0].mru));
489         maxPayload.type = htons(TAG_PPP_MAX_PAYLOAD);
490         maxPayload.length = htons(sizeof(mru));
491         memcpy(maxPayload.payload, &mru, sizeof(mru));
492         CHECK_ROOM(cursor, packet.payload, sizeof(mru) + TAG_HDR_SIZE);
493         memcpy(cursor, &maxPayload, sizeof(mru) + TAG_HDR_SIZE);
494         cursor += sizeof(mru) + TAG_HDR_SIZE;
495         plen += sizeof(mru) + TAG_HDR_SIZE;
496     }
497
498     /* Copy cookie and relay-ID if needed */
499     if (conn->cookie.type) {
500         CHECK_ROOM(cursor, packet.payload,
501                    ntohs(conn->cookie.length) + TAG_HDR_SIZE);
502         memcpy(cursor, &conn->cookie, ntohs(conn->cookie.length) + TAG_HDR_SIZE);
503         cursor += ntohs(conn->cookie.length) + TAG_HDR_SIZE;
504         plen += ntohs(conn->cookie.length) + TAG_HDR_SIZE;
505     }
506
507     if (conn->relayId.type) {
508         CHECK_ROOM(cursor, packet.payload,
509                    ntohs(conn->relayId.length) + TAG_HDR_SIZE);
510         memcpy(cursor, &conn->relayId, ntohs(conn->relayId.length) + TAG_HDR_SIZE);
511         cursor += ntohs(conn->relayId.length) + TAG_HDR_SIZE;
512         plen += ntohs(conn->relayId.length) + TAG_HDR_SIZE;
513     }
514
515     packet.length = htons(plen);
516     sendPacket(conn, conn->discoverySocket, &packet, (int) (plen + HDR_SIZE));
517 }
518
519 /**********************************************************************
520 *%FUNCTION: waitForPADS
521 *%ARGUMENTS:
522 * conn -- PPPoE connection info
523 * timeout -- how long to wait (in seconds)
524 *%RETURNS:
525 * Nothing
526 *%DESCRIPTION:
527 * Waits for a PADS packet and copies useful information
528 ***********************************************************************/
529 static void
530 waitForPADS(PPPoEConnection *conn, int timeout)
531 {
532     fd_set readable;
533     int r;
534     struct timeval tv;
535     struct timeval expire_at;
536
537     PPPoEPacket packet;
538     int len;
539
540     if (get_time(&expire_at) < 0) {
541         error("get_time (waitForPADS): %m");
542         return;
543     }
544     expire_at.tv_sec += timeout;
545
546     conn->error = 0;
547     do {
548         if (BPF_BUFFER_IS_EMPTY) {
549             if (!time_left(&tv, &expire_at))
550                 return;         /* Timed out */
551
552             FD_ZERO(&readable);
553             FD_SET(conn->discoverySocket, &readable);
554
555             while(1) {
556                 r = select(conn->discoverySocket+1, &readable, NULL, NULL, &tv);
557                 if (r >= 0 || errno != EINTR || got_sigterm) break;
558             }
559             if (r < 0) {
560                 error("select (waitForPADS): %m");
561                 return;
562             }
563             if (r == 0)
564                 return;         /* Timed out */
565         }
566
567         /* Get the packet */
568         receivePacket(conn->discoverySocket, &packet, &len);
569
570         /* Check length */
571         if (ntohs(packet.length) + HDR_SIZE > len) {
572             error("Bogus PPPoE length field (%u)",
573                    (unsigned int) ntohs(packet.length));
574             continue;
575         }
576
577 #ifdef USE_BPF
578         /* If it's not a Discovery packet, loop again */
579         if (etherType(&packet) != Eth_PPPOE_Discovery) continue;
580 #endif
581
582         /* If it's not from the AC, it's not for me */
583         if (memcmp(packet.ethHdr.h_source, conn->peerEth, ETH_ALEN)) continue;
584
585         /* If it's not for us, loop again */
586         if (!packetIsForMe(conn, &packet)) continue;
587
588         /* Is it PADS?  */
589         if (packet.code == CODE_PADS) {
590             /* Parse for goodies */
591             if (parsePacket(&packet, parsePADSTags, conn) < 0)
592                 return;
593             if (conn->error)
594                 return;
595             conn->discoveryState = STATE_SESSION;
596             break;
597         }
598     } while (conn->discoveryState != STATE_SESSION);
599
600     /* Don't bother with ntohs; we'll just end up converting it back... */
601     conn->session = packet.session;
602
603     info("PPP session is %d", (int) ntohs(conn->session));
604
605     /* RFC 2516 says session id MUST NOT be zero or 0xFFFF */
606     if (ntohs(conn->session) == 0 || ntohs(conn->session) == 0xFFFF) {
607         error("Access concentrator used a session value of %x -- the AC is violating RFC 2516", (unsigned int) ntohs(conn->session));
608     }
609 }
610
611 /**********************************************************************
612 *%FUNCTION: discovery
613 *%ARGUMENTS:
614 * conn -- PPPoE connection info structure
615 *%RETURNS:
616 * Nothing
617 *%DESCRIPTION:
618 * Performs the PPPoE discovery phase
619 ***********************************************************************/
620 void
621 discovery(PPPoEConnection *conn)
622 {
623     int padiAttempts = 0;
624     int padrAttempts = 0;
625     int timeout = conn->discoveryTimeout;
626
627     do {
628         padiAttempts++;
629         if (got_sigterm || padiAttempts > conn->discoveryAttempts) {
630             warn("Timeout waiting for PADO packets");
631             close(conn->discoverySocket);
632             conn->discoverySocket = -1;
633             return;
634         }
635         sendPADI(conn);
636         conn->discoveryState = STATE_SENT_PADI;
637         waitForPADO(conn, timeout);
638
639         timeout *= 2;
640     } while (conn->discoveryState == STATE_SENT_PADI);
641
642     timeout = conn->discoveryTimeout;
643     do {
644         padrAttempts++;
645         if (got_sigterm || padrAttempts > conn->discoveryAttempts) {
646             warn("Timeout waiting for PADS packets");
647             close(conn->discoverySocket);
648             conn->discoverySocket = -1;
649             return;
650         }
651         sendPADR(conn);
652         conn->discoveryState = STATE_SENT_PADR;
653         waitForPADS(conn, timeout);
654         timeout *= 2;
655     } while (conn->discoveryState == STATE_SENT_PADR);
656
657     if (!conn->seenMaxPayload) {
658         /* RFC 4638: MUST limit MTU/MRU to 1492 */
659         if (lcp_allowoptions[0].mru > ETH_PPPOE_MTU)
660             lcp_allowoptions[0].mru = ETH_PPPOE_MTU;
661         if (lcp_wantoptions[0].mru > ETH_PPPOE_MTU)
662             lcp_wantoptions[0].mru = ETH_PPPOE_MTU;
663     }
664
665     /* We're done. */
666     close(conn->discoverySocket);
667     conn->discoverySocket = -1;
668     conn->discoveryState = STATE_SESSION;
669     return;
670 }