+ if (*p == 26 && p[1] >= 7)
+ {
+ // Vendor-Specific Attribute
+ uint32_t vendor = ntohl(*(int *)(p + 2));
+ uint8_t attrib = *(p + 6);
+ int attrib_length = *(p + 7) - 2;
+
+ LOG(4, s, session[s].tunnel, " Radius reply contains Vendor-Specific. Vendor=%u Attrib=%u Length=%d\n", vendor, attrib, attrib_length);
+ if (vendor == 9 && attrib == 1) // Cisco-AVPair
+ {
+ if (attrib_length < 0) continue;
+ LOG(3, s, session[s].tunnel, " Cisco-AVPair value: %.*s\n",
+ attrib_length, p + 8);
+
+ handle_avpair(s, p + 8, attrib_length);
+ continue;
+ }
+ else if (vendor == 529 && attrib >= 135 && attrib <= 136) // Ascend
+ {
+ // handle old-format ascend DNS attributes below
+ p += 6;
+ }
+ else
+ {
+ LOG(3, s, session[s].tunnel, " Unknown vendor-specific\n");
+ continue;
+ }
+ }
+