+ else if (*p == 27)
+ {
+ // Session timeout
+ if (p[1] < 6) {
+ LOG(2, s, session[s].tunnel, "Error: Received Session timeout with length %d < 6\n", p[1]);
+ continue;
+ }
+
+ session[s].timeout = ntohl(*(uint32_t *) (p + 2));
+ LOG(3, s, session[s].tunnel, " Radius reply contains Session timeout %d\n", session[s].timeout);
+ if (!session[s].timeout)
+ sessionshutdown(s, "Session timeout is zero", CDN_ADMIN_DISC, TERM_SESSION_TIMEOUT);
+ }