* FIXME: should have a #define for the attribute...
* SoH-Supported == 2119 in dictionary.freeradius.internal
*/
- vp[0] = pairfind(request->packet->vps, 2119);
+ vp[0] = pairfind(request->packet->vps, 2119, 0);
if (!vp[0])
return 0;
if (strncasecmp(fmt, "OS", 2) == 0) {
/* OS vendor */
- vp[0] = pairfind(request->packet->vps, 2100);
- vp[1] = pairfind(request->packet->vps, 2101);
- vp[2] = pairfind(request->packet->vps, 2102);
- vp[3] = pairfind(request->packet->vps, 2103);
- vp[4] = pairfind(request->packet->vps, 2104);
- vp[5] = pairfind(request->packet->vps, 2105);
-
- if (vp[0] && vp[0]->vp_integer == 311) {
+ vp[0] = pairfind(request->packet->vps, 2100, 0);
+ vp[1] = pairfind(request->packet->vps, 2101, 0);
+ vp[2] = pairfind(request->packet->vps, 2102, 0);
+ vp[3] = pairfind(request->packet->vps, 2103, 0);
+ vp[4] = pairfind(request->packet->vps, 2104, 0);
+ vp[5] = pairfind(request->packet->vps, 2105, 0);
+
+ if (vp[0] && vp[0]->vp_integer == VENDORPEC_MICROSOFT) {
if (!vp[1]) {
snprintf(out, outlen, "Windows unknown");
} else {
static int soh_postauth(UNUSED void * instance, REQUEST *request)
{
#ifdef WITH_DHCP
+ int rcode;
VALUE_PAIR *vp;
vp = pairfind(request->packet->vps, DHCP2ATTR(43));
} else {
RDEBUG("SoH decoding NAP from DHCP request");
/* SoH payload */
- soh_verify(request, request->packet->vps, data, vlen);
+ rcode = soh_verify(request, request->packet->vps, data, vlen);
+ if (rcode < 0) {
+ return RLM_MODULE_FAIL;
+ }
}
break;
default:
int rv;
/* try to find the MS-SoH payload */
- vp = pairfind(request->packet->vps, (311 | 16) | 55);
+ vp = pairfind(request->packet->vps, 55, VENDORPEC_MICROSOFT);
if (!vp) {
RDEBUG("SoH radius VP not found");
return RLM_MODULE_NOOP;
RDEBUG("SoH radius VP found");
/* decode it */
rv = soh_verify(request, request->packet->vps, vp->vp_octets, vp->length);
+ if (rv < 0) {
+ return RLM_MODULE_FAIL;
+ }
return RLM_MODULE_OK;
}