From: Alan T. DeKok Date: Fri, 29 Oct 2010 17:50:29 +0000 (-0400) Subject: Use VENDORPEC_MICROSOFT instead of hard-coded 311 X-Git-Tag: release_3_0_0_beta0~1180 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=freeradius.git;a=commitdiff_plain;h=1f8bea3f039c9892f3b7d95f3509f1264b94ddeb Use VENDORPEC_MICROSOFT instead of hard-coded 311 Also updated API for 2.2 --- diff --git a/src/modules/rlm_soh/rlm_soh.c b/src/modules/rlm_soh/rlm_soh.c index 9a76d78..8238290 100644 --- a/src/modules/rlm_soh/rlm_soh.c +++ b/src/modules/rlm_soh/rlm_soh.c @@ -62,7 +62,7 @@ static size_t soh_xlat(UNUSED void *instance, REQUEST *request, char *fmt, char vp[4] = pairfind(request->packet->vps, 2104, 0); vp[5] = pairfind(request->packet->vps, 2105, 0); - if (vp[0] && vp[0]->vp_integer == 311) { + if (vp[0] && vp[0]->vp_integer == VENDORPEC_MICROSOFT) { if (!vp[1]) { snprintf(out, outlen, "Windows unknown"); } else { @@ -201,7 +201,7 @@ static int soh_authorize(UNUSED void * instance, REQUEST *request) 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;