Patch AVP parsing in EAP-TTLS module in FreeRADIUS
[strongswan.git] / testing / scripts / recipes / patches / freeradius-avp-size
1 diff --git a/src/modules/rlm_eap/types/rlm_eap_ttls/ttls.c b/src/modules/rlm_eap/types/rlm_eap_ttls/ttls.c
2 index 6c9bd13..3344c53 100644
3 --- a/src/modules/rlm_eap/types/rlm_eap_ttls/ttls.c
4 +++ b/src/modules/rlm_eap/types/rlm_eap_ttls/ttls.c
5 @@ -201,8 +201,11 @@ static VALUE_PAIR *diameter2vp(REQUEST *request, SSL *ssl,
6                         goto next_attr;
7                 }
8  
9 -               if (size > 253) {
10 -                       RDEBUG2("WARNING: diameter2vp skipping long attribute %u, attr");
11 +               /*
12 +                * EAP-Message AVPs can be larger than 253 octets.
13 +                */
14 +               if ((size > 253) && !((VENDOR(attr) == 0) && (attr == PW_EAP_MESSAGE))) {
15 +                       RDEBUG2("WARNING: diameter2vp skipping long attribute %u", attr);
16                         goto next_attr;
17                 }
18