From 1f8bea3f039c9892f3b7d95f3509f1264b94ddeb Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Fri, 29 Oct 2010 13:50:29 -0400 Subject: [PATCH] Use VENDORPEC_MICROSOFT instead of hard-coded 311 Also updated API for 2.2 --- src/modules/rlm_soh/rlm_soh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.1.4