aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_codec.erl
AgeCommit message (Collapse)Author
2013-06-10Minor macro simplificationAnders Svensson
2013-05-17Add spec to diameter_codecAnders Svensson
2013-05-17Fix recognition of 5014 (INVALID_AVP_LENGTH) errorsAnders Svensson
Invalid lengths come in two flavours: ones that correctly point at the end of an AVP's payload but don't agree with its type, and ones that point elsewhere. The former are relatively harmless but the latter leave no way to recover AVP boundaries, which typically results in failure to decode subsequent AVP's in the message in question. In the case that AVP Length points past the end of the message, diameter incorrectly regarded the error as 5009, INVALID_AVP_BITS: not right since the error has nothing to do with AVP Flags. Ditto if the length was less than 8, a minimal header length. Only in the remaining case was the detected error 5014, INVALID_AVP_LENGTH. However, in this case it slavishly followed RFC 3588 in suggesting the undecodable AVP as Failed-AVP, thereby passing the woeful payload back to the sender to have equal difficulty decoding. Now follow RFC 6733 and suggest an AVP with a zero-filled payload.
2013-04-22Fix decode failure when AVP Length < 8Anders Svensson
Such a length caused decode of a message with valid (24-bit) length to fail. Note that the error detected is wrong: it should be 5014 (INVALID_AVP_LENGTH), not 3009 (INVALID_AVP_BITS). This will be dealt with by OTP-11007.
2013-02-08Don't hardcode common dictionaryAnders Svensson
Instead, use whatever dictionary a transport has configured as supporting application id 0. This is to support the updated RFC 6733 dictionaries (which bring with them updated records) and also to be able to transparently support any changed semantics (eg. 5xxx in answer-message).
2013-01-15Fix setting of Application-IDAnders Svensson
An answer message with the E flag erroneously set the value to 0.
2012-10-04Add missing clause for peer failoverAnders Svensson
diameter_codec:sequence_numbers/1 is called on an already extracted pair of sequence numbers in the case of failover.
2012-08-28Merge branch 'anders/diameter/capabilities_encode/OTP-10203' into maintAnders Svensson
* anders/diameter/capabilities_encode/OTP-10203: Deal with the fact that capabilities config may be incomplete
2012-08-24Deal with the fact that capabilities config may be incompleteAnders Svensson
A transport can be configured before its service so handle insufficient configuration instead of crashing at CER/CEA encode.
2012-07-04Encode fixAnders Svensson
The header is used when incrementing counters. Sending answers in the list form was broken because of this.
2011-11-10Send events for connection establishment failureAnders Svensson
If a peer fsm process exits then the exit reason is received by the service process in a 'DOWN' message. If the reason is the one generated by diameter_peer_fsm:close/2, which is called to signal a non-transport failure before the completion of capabilities exchange (eg. receiving an unsuccessful CEA), then an event is sent to any subscribers. Also, tweak capabilities_cb return values for more informative event data.
2011-10-17One makefile for src build instead of recursionAnders Svensson
Simpler, no duplication of similar makefiles and makes for better dependencies. (Aka, recursive make considered harmful.)