Subject: [AAA-WG]: DIAMETER_INVALID_AVP_LENGTH Result-Code

From: Cain Brian-BCAIN1 <[email-masked]>
Date: Wed, 16 Jan 2002 11:30:29 -0600

>      DIAMETER_INVALID_AVP_LENGTH        5015
>         The request contained an AVP with an invalid length. A Diameter
>         message indicating this error MUST include the offending AVPs
>         within a Failed-AVP AVP

I can think of two cases for which this result code is pertinent.  First, a protocol error, a length field is filled in with an incorrect value by the sender (undetectable until an AVP length field, probably due to misalignment, specifies a length that goes beyond the boundary of the command's length).  Second, an AVP with code n correlates to an AVP of type m.  In this case, m is a fixed-length field.  m's length does not match the length field in this AVP's header.

Are both of these cases intended to be served by DIAMETER_INVALID_AVP_LENGTH?  Would some clarifying text be in order?

-Brian

---

From: David Frascone <[email-masked]>
Date: Wed, 16 Jan 2002 11:34:36 -0600

> Are both of these cases intended to be served by DIAMETER_INVALID_AVP_LENGTH?  Would some clarifying text be in order?

If the length goes beyond the boundry of the command's length, then it is
a protocol error, and this error would not be returned.  You're probably
trying to parse garbage.  The connection will/should be dropped, and an
error response is optional.

So, I think this error would ONLY be returned, say, if a 32 bit integer
AVP had other than 4 bytes in it's data field, or an ip address had more than
16, etc.

-Dave