From: Herwin Weststrate Date: Wed, 22 Jul 2015 09:57:16 +0000 (+0200) Subject: Use define for Service-Type value check X-Git-Tag: release_3_0_10~306 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1159%2Fhead;p=thirdparty%2Ffreeradius-server.git Use define for Service-Type value check The value 17 (Authorize-Only) has been added in RFC3576, the other values were already present in RFC 2865, most likely that's the reason the symbolic name was missing. --- diff --git a/src/include/radius.h b/src/include/radius.h index 186e596986..12fa78dde4 100644 --- a/src/include/radius.h +++ b/src/include/radius.h @@ -130,6 +130,7 @@ typedef enum { #define PW_NAS_PROMPT_USER 7 #define PW_AUTHENTICATE_ONLY 8 #define PW_CALLBACK_NAS_PROMPT 9 +#define PW_AUTHORIZE_ONLY 17 /* Framed Protocols */ diff --git a/src/main/listen.c b/src/main/listen.c index 3bb42e4027..3cba3e71be 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -1779,7 +1779,7 @@ int rad_coa_recv(REQUEST *request) */ vp = fr_pair_find_by_num(request->packet->vps, PW_SERVICE_TYPE, 0, TAG_ANY); if (request->packet->code == PW_CODE_COA_REQUEST) { - if (vp && (vp->vp_integer == 17)) { + if (vp && (vp->vp_integer == PW_AUTHORIZE_ONLY)) { vp = fr_pair_find_by_num(request->packet->vps, PW_STATE, 0, TAG_ANY); if (!vp || (vp->vp_length == 0)) { REDEBUG("CoA-Request with Service-Type = Authorize-Only MUST contain a State attribute");