- // Idle-Timeout
- uint32_t to = ntohl(*(uint32_t *)(p + 2));
-
- LOG(3, s, session[s].tunnel, " Radius reply contains Idle-Timeout = %u\n", to);
- if (to > 0)
- {
- session[s].idle_timeout = to;
- }
- }
- else if (*p == 26 && p[1] >= 7)
- {
- // Vendor-Specific Attribute
- int vendor = ntohl(*(int *)(p + 2));
- char attrib = *(p + 6);
- int attrib_length = *(p + 7) - 2;
-
- LOG(3, s, session[s].tunnel, " Radius reply contains Vendor-Specific. Vendor=%d Attrib=%d Length=%d\n", vendor, attrib, attrib_length);
- if (vendor != 9 || attrib != 1)
- {
- LOG(3, s, session[s].tunnel, " Unknown vendor-specific\n");
- continue;
- }
-
- if (attrib_length > 0)
- {
- LOG(3, s, session[s].tunnel, " Cisco-AVPair value: %.*s\n",
- attrib_length, p + 8);
-
- handle_avpair(s, p + 8, attrib_length);
- }
+ // Idle-Timeout
+ if (p[1] < 6) continue;
+ session[s].idle_timeout = ntohl(*(uint32_t *)(p + 2));
+ LOG(3, s, session[s].tunnel, " Radius reply contains Idle-Timeout = %u\n", session[s].idle_timeout);