freeradius3: filling vp_strvalue for INTEGER attributes - off by default?
Alan DeKok
aland at deployingradius.com
Fri Feb 26 14:16:19 CET 2016
On Feb 26, 2016, at 7:46 AM, Boris Lytochkin <lytboris at yandex-team.ru> wrote:
> We have a module that used to work in with freeradius 2.1. It has the following code:
>
> if ((vp = pairfind(request->packet->vps, PW_NAS_PORT_TYPE)) != NULL && strcmp((char const *)vp->vp_strvalue, "Wireless-802.11") == 0)
NAS-Port-Type is an integer. You should be checking the integer value of the attribute, not the string value.
> In freeradius 2.1 (and configuration it had) was initialized with actual string value of this attribute, in freeradius 3.0 vp_strvalue is not initialized (causing module to crush of course). I know it is the the best to check integer value but still..
It's "best" because it's correct.
> I am curious if anybody know is this a intended code change or it is a glitch in my 3.0 configuration?
Your code was wrong. Check the integer value.
Alan DeKok.
More information about the Freeradius-Devel
mailing list