From: Alan T. DeKok Date: Thu, 12 May 2011 08:24:56 +0000 (+0200) Subject: CUI is allowed to have zero-length X-Git-Tag: release_3_0_0_beta0~847 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe37b7ec46541a641a7c9a8975befd371f7fce23;p=thirdparty%2Ffreeradius-server.git CUI is allowed to have zero-length --- diff --git a/src/lib/radius.c b/src/lib/radius.c index 9a5989f4da5..33a9c30e069 100644 --- a/src/lib/radius.c +++ b/src/lib/radius.c @@ -1492,10 +1492,17 @@ int rad_vp2rfc(const RADIUS_PACKET *packet, return -1; } + /* + * Only CUI is allowed to have zero length. + * Thank you, WiMAX! + */ if ((vp->length == 0) && - (vp->attribute != PW_CHARGEABLE_USER_IDENTITY)) { + (vp->attribute == PW_CHARGEABLE_USER_IDENTITY)) { + ptr[0] = PW_CHARGEABLE_USER_IDENTITY; + ptr[1] = 2; + *pvp = vp->next; - return 0; + return 2; } return vp2attr_rfc(packet, original, secret, pvp, vp->attribute,