aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter
AgeCommit message (Collapse)Author
2013-09-12vsn -> 1.4.3Anders Svensson
2013-09-12Update appup for diameter-1.4.3 in R16B02Anders Svensson
2013-09-09Merge branch 'anders/diameter/spawn_opt/OTP-11299' into maintAnders Svensson
* anders/diameter/spawn_opt/OTP-11299: Fix broken spawn_opt
2013-09-09Merge branch 'anders/diameter/failed_avp/OTP-11293' into maintAnders Svensson
* anders/diameter/failed_avp/OTP-11293: Fix Failed-AVP construction for CEA/DWA/DPA
2013-09-04Fix Failed-AVP construction for CEA/DWA/DPAAnders Svensson
Send of Failed-AVP resulted in encode failure.
2013-09-04Fix broken spawn_optAnders Svensson
The option was morphed into a boolean() and then ignored.
2013-07-30Simplify Address encode/decodeAnders Svensson
By using binary comprehensions. Add string-valued addresses to codec suite.
2013-07-30Use module unicode for UTF8String encode/decodeAnders Svensson
The original code predates that module but there's no reason not to use it now.
2013-07-30Fix UTF8String encodeAnders Svensson
To accept any nested list of codepoints and binaries. A list containing a binary was previously misinterpreted and the documentation was incomplete. Also, rework codec suite slightly to be able to specify values for which decode o encode is the identity map, for which encode should succeed, and for which encode should fail.
2013-07-12Ensure DWR isn't sent immediately after DWAAnders Svensson
Having the peer_fsm process answer DWR meant that watchdog timer expiry could result in an outgoing DWR despite the fact that an incoming DWR was just answered. Having the watchdog process answer avoids this. diameter_peer_fsm must be loaded before diameter_watchdog. It's possible for one incoming DWR to go unanswered but a subsequent DWR will be answered so no harm is done.
2013-07-12Comment tweaksAnders Svensson
2013-06-17Prepare releaseOTP_R16B01Erlang/OTP
2013-06-13Fix list-valued Vendor-Specific-Application-Id configAnders Svensson
Commit f0a36c79 broke the handling of such configuration, resulting in a function clause error in diameter_capx if the list was not of length 3, and faulty extraction of application id's otherwise. Only record-valued config was properly interpreted.
2013-06-11Merge branch 'anders/diameter/request_spawn/OTP-11060' into maintAnders Svensson
* anders/diameter/request_spawn/OTP-11060: Minor doc fix
2013-06-11Minor doc fixAnders Svensson
2013-06-11Merge branch 'anders/diameter/release/R16B01/OTP-11120' into maintAnders Svensson
* anders/diameter/release/R16B01/OTP-11120: vsn -> 1.4.2 Update appup for R16B01 Trailing whitespace and copyright fixes Minor macro simplification Move app/appsrc from src/base into src
2013-06-11Merge branch 'anders/diameter/request_spawn/OTP-11060' into maintAnders Svensson
* anders/diameter/request_spawn/OTP-11060: Make spawn options for request processes configurable
2013-06-10vsn -> 1.4.2Anders Svensson
2013-06-10Update appup for R16B01Anders Svensson
Tickets and corresponding runtime modules, in order merged: OTP-9610 (distribution) diameter diameter_config diameter_peer diameter_service diameter_traffic diameter_service must precede diameter_peer. OTP-10972 (app_not_configured) diameter diameter_config diameter_lib diameter_peer_fsm diameter_watchdog Load order is unimportant. OTP-11017 (service_config) diameter_config OTP-10986 (address_config) diameter_peer diameter_peer_fsm diameter_tcp diameter_tcp must follow the others. OTP-11019 (watchdog_leak) diameter_service OTP-11026 (avp_length_failure) diameter_codec OTP-11007 (avp_decode) diameter_gen.hrl => diameter_gen_* diameter_codec diameter_traffic diameter_traffic must precede diameter_gen_*. OTP-11087 (missed_5001) diameter_gen.hrl => diameter_gen_* OTP-11115 (watchdog_function_clause) diameter_watchdog OTP-11050 (inband_security) diameter_peer_fsm diameter_capx This order is required. OTP-11045 (host_ip_address) diameter_peer_fsm OTP-11092 (5xxx_failed_avp) diameter_traffic OTP-11127 (one_failed_avp) diameter_peer_fsm OTP-10893 (peer_address_config) diameter_peer diameter_tcp diameter_sctp diameter_peer must precede the others. OTP-11060 (request_spawn) diameter_service diameter_traffic diameter_config diameter diameter_traffic should precede diameter_service, diameter_config should follow. Tickets without code: OTP-10903 (examples_suite) OTP-11014 (release_notes) OTP-11051 (mkdir_race) OTP-10914 (timetraps)
2013-06-10Make spawn options for request processes configurableAnders Svensson
That is, for the process that's spawned for each incoming Diameter request message.
2013-06-10Let diameter_{tcp,sctp} be configured with permissible remote addressesAnders Svensson
Option 'accept' allows remote addresses to be configured as tuples or regular expressions. The remote addresses for any incoming (aka accepted) connection/association are matched against the configured values, any non-matching address causing the connection/association to be aborted.
2013-06-10Fix diameter_{tcp,sctp} specAnders Svensson
The third argument to start/3 was just wrong.
2013-06-10Remove trailing whitespaceAnders Svensson
2013-06-10Trailing whitespace and copyright fixesAnders Svensson
2013-06-10Minor macro simplificationAnders Svensson
2013-06-10Move app/appsrc from src/base into srcAnders Svensson
2013-06-02Merge branch 'anders/diameter/one_failed_avp/OTP-11127' into maintAnders Svensson
* anders/diameter/one_failed_avp/OTP-11127: Adapt CEA/DPA Failed-AVP to RFC 6733
2013-06-02Merge branch 'anders/diameter/5xxx_failed_avp/OTP-11092' into maintAnders Svensson
* anders/diameter/5xxx_failed_avp/OTP-11092: Fix setting of Failed-AVP on {answer_message, 5xxx} from handle_request
2013-06-02Fix setting of Failed-AVP on {answer_message, 5xxx} from handle_requestAnders Svensson
RFC 6733 says that certain 5xxx result codes must be accompanied by Failed-AVP, and decode populates #diameter_packet.errors with Result-Code/AVP pairs for errors it detects. However, Failed-AVP was not set in the outgoing answer if the handle_request callback returned {answer_message, 5xxx}. It is now set with the AVP from the first pair with the specified Result-Code, if found. Note that {answer_message, 5xxx} doesn't handle all cases in which a 5xxx answer is required, only that in which the setting above is appropriate. If it isn't then handle_request should construct its answer and return {reply, Ans}.
2013-06-02Merge branch 'anders/diameter/host_ip_address/OTP-11045' into maintAnders Svensson
* anders/diameter/host_ip_address/OTP-11045: Respect Host-IP-Address configuration
2013-06-02Respect Host-IP-Address configurationAnders Svensson
Addresses returned from a transport module were always used to populate Host-IP-Address AVP's in an outgoing CER/CEA, which precluded the sending of a VIP address. Transport addresses are now only used if Host-IP-Address is unspecified. In other words, respect any configured Host-IP-Address, regardless of the physical addresses returned by the transport. To use the physical addresses, don't configure Host-IP-Address.
2013-05-31Adapt CEA/DPA Failed-AVP to RFC 6733Anders Svensson
By setting only one, not many. The handling for other messages (except DWA, which is forgiving of errors) was dealt with in commit f7ec93e3.
2013-05-30Don't send default Inband-Security-Id in CER/CEAAnders Svensson
RFC 6733 recommends against the use of Inband-Security-Id, so only send a value that differs from the default.
2013-05-29Merge branch 'anders/diameter/watchdog_function_clause/OTP-11115' into maintAnders Svensson
* anders/diameter/watchdog_function_clause/OTP-11115: Fix watchdog function_clause
2013-05-29Merge branch 'anders/diameter/missed_5001/OTP-11087' into maintAnders Svensson
* anders/diameter/missed_5001/OTP-11087: Remove redundant integer type specifiers from binaries Fix recognition of 5001 on mandatory AVP's
2013-05-29Merge branch 'anders/diameter/avp_decode/OTP-11007' into maintAnders Svensson
* anders/diameter/avp_decode/OTP-11007: Detect all 5005 (MISSING_AVP) errors and don't reverse errors Adapt Failed-AVP setting to RFC 6733 Add spec to diameter_codec Add spec to diameter_gen Fix recognition of 5014 (INVALID_AVP_LENGTH) errors Ensure setting Failed-AVP is appropriate Correct AVP Length error testcases
2013-05-29Merge branch 'anders/diameter/avp_length_failure/OTP-11026' into maintAnders Svensson
* anders/diameter/avp_length_failure/OTP-11026: Fix decode failure when AVP Length < 8
2013-05-29Remove redundant integer type specifiers from binariesAnders Svensson
2013-05-29Fix recognition of 5001 on mandatory AVP'sAnders Svensson
An AVP setting the M-bit was not regarded as erroneous if it was defined in the dictionary in question and its container (message or Grouped AVP) had an 'AVP' field. It's now regarded as a 5001 error (AVP_UNSUPPORTED), as in the case that the AVP is not defined.
2013-05-29Merge branch 'anders/diameter/timetraps/OTP-10914' into maintAnders Svensson
* anders/diameter/timetraps/OTP-10914: Add examples testcase to help identify timetrap failures Minor traffic suite fix Add gen_tcp suite Lighten up on suite timetraps Add more information to traffic suite timeout failures
2013-05-27Fix watchdog function_clauseAnders Svensson
Commit 0b7c87dc caused diameter_watchdog:restart/2 to start returning 'stop', so that a watchdog process for a listening transport that allowed multiple connections to the same peer would die one watchdog timeout after losing a connection. The new return value was supposed to be passed up to transition/2, but was instead passed to set_watchdog/1, resulting in a function_clause error. The resulting crash was harmless but unseemly. Not detected by dialyzer. Thanks to Aleksander Nycz.
2013-05-17Detect all 5005 (MISSING_AVP) errors and don't reverse errorsAnders Svensson
The previous commit ensures that only one will be reported in an answer message when diameter itself sets Result-Code/Failed-AVP. The order of errors in #diameter_packet.errors is that in which they're detected, not the reverse as previously.
2013-05-17Adapt Failed-AVP setting to RFC 6733Anders Svensson
When setting these from an #diameter_packet.errors list, select one Result-Code or {Result-Code, Failed-AVP}, instead of accumulating all AVP's from the 2-tuples in the list. This is more in keeping with RFC 6733: 7.5. Failed-AVP AVP The Failed-AVP AVP (AVP Code 279) is of type Grouped and provides debugging information in cases where a request is rejected or not fully processed due to erroneous information in a specific AVP. The value of the Result-Code AVP will provide information on the reason for the Failed-AVP AVP. A Diameter answer message SHOULD contain an instance of the Failed-AVP AVP that corresponds to the error indicated by the Result-Code AVP. For practical purposes, this Failed-AVP would typically refer to the first AVP processing error that a Diameter node encounters. The text of RFC 3588 was less specific, not including the last two sentences. Note that an improper AVP Length will result in both 5014 and 5005 being detected for the same AVP. Without this commit, Failed-AVP would be populated with two AVP's for the same error.
2013-05-17Add spec to diameter_codecAnders Svensson
2013-05-17Add spec to diameter_genAnders 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-05-03Ensure setting Failed-AVP is appropriateAnders Svensson
When setting Failed-AVP in a message record, it was never tested that the field was actually present. RFC 6733 says it should be, 3588 says MAY.
2013-05-02Correct AVP Length error testcasesAnders Svensson
To return what RFC 6733 says. 3588 says less so follow 6733, even though the extra specification of 6733 means that it isn't strictly backwards compatible. In particular, 6733 says to send a zero'd payload or none at all while 3588 says to send the offending AVP, despite the fact that the peer will likely have equal difficulty in decoding it. The testcases now fail, which will be remedied in subsequent commits.
2013-04-23Add examples testcase to help identify timetrap failuresAnders Svensson
There are still enslave/1 failures on some hosts despite a 2 minute timetrap.
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.