Subject: [Dime] Failed-AVP and structural validity

From: "Gerasimos Dimitriadis" <[email-masked]>
Date: Tue, 9 Oct 2012 01:58:13 +0300 (EEST)

Hi all,

I'd like to ask a couple of questions regarding the encoding of the
Failed-AVP AVP, in case of invalid AVP lengths. Actually, both
questions stem from the same root, which is: How hard should the
encoder of the Failed-AVP try, so that the structure of the Failed-AVP
is valid?

The RFC 3588 bis document states that when a Grouped AVP has an
invalid AVP length, "the grouped AVP header with an empty payload
would be sufficient to indicate the offending AVP". In such a case,
does the grouped AVP header length need to be adjusted so that a valid
structure is maintained, or should the offending AVP header be copied
as-is from the original octet stream?

A similar question is how to handle cases where the AVP length is
below a minimum or exceeds the message length. After appending to
the header a number of zero octets as payload, should the AVP header
length be accordingly adjusted?

The dilemma I am facing now is the one below:
By reading the RFC, I tend to believe that such adjustments are not
required (especially since they would hinder pinpointing the offending
AVP). On the other hand, I don't feel very confident and fear that
maybe this way an error is not just reported, but rather a wholy
faulty message is generated back. Since the definition of the
Fauly-AVP is:

         <Failed-AVP> ::= < AVP Header: 279 >
                       1* {AVP}

it doesn't seem that unreasonable to have a Failed-AVP that is
structurally sound.

Because of all the above, I would really appreciate your feedback
on this matter.

Thank you very much in advance and Best Regards,
Gerasimos