aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter
AgeCommit message (Collapse)Author
2013-03-27Merge branch 'anders/diameter/app_not_configured/OTP-10972' into maintAnders Svensson
* anders/diameter/app_not_configured/OTP-10972: Fix faulty sequence validation Add config suite Deal with config errors detected at transport start less brutally Move most transport_opt() validation into diameter_config Minor doc/spec fix Minor diameter_lib cleanup
2013-03-26Fix faulty sequence validationAnders Svensson
The validation of {sequence, {H,N}} incorrectly checked that H was an N-bit integer, instead of the intended 32-N.
2013-03-26Add config suiteAnders Svensson
To verify return values from diameter:start_service/2 and diameter:add_transport/2 when passing various config.
2013-03-26Deal with config errors detected at transport start less brutallyAnders Svensson
Crashing watchdog and peer_fsm processes was somewhat unseemly. Emit an error report and die silently instead.
2013-03-26Move most transport_opt() validation into diameter_configAnders Svensson
Faulty configuration was previously passed directly on to watchdog and peer_fsm processes, diameter:add_transport/2 happily returning ok and the error resulting on failure of watchdog and/or peer_fsm processes. Now check for errors before getting this far, returning {error, Reason} from diameter:add_transport/2 when one is detected. There are still some errors that can only be detected after transport start (eg. a misbehaving callback) but most will be caught early.
2013-03-26Minor doc/spec fixAnders Svensson
'infinity' is a valid transport_config timeout.
2013-03-25Minor diameter_lib cleanupAnders Svensson
Remove unused functions, add dialyzer specs, make wait/1 less fallible.
2013-03-24Compile example dictionaries against both RFC 3588 and 6733Anders Svensson
2013-03-24Compile example dicts from the repo when running locallyAnders Svensson
Instead of from the installation.
2013-03-24Documentation fixesAnders Svensson
Fix errors and omissions related to dictionary compilation.
2013-03-24Move example dict compilation to examples suiteAnders Svensson
From compiler suite.
2013-03-24Add examples suite for testing example codeAnders Svensson
That is, code installed under examples/code in an installation.
2013-03-24Minor tweaks and fixesAnders Svensson
Fix a broken include in example code, remove an inappropriate ct:pal/2 outside of a testcase, echo more info from test/Makefile.
2013-03-19Merge branch 'maint-r16' into maintAnders Svensson
2013-03-19Prepare releaseErlang/OTP
2013-03-19Minor capx suite fixAnders Svensson
2013-03-18Update appup, vsn -> 1.4.1.1Anders Svensson
2013-03-18Deal with RFC 6733 change to Vendor-Specific-Application-IdAnders Svensson
RFC 6733 has changed the arity of Vendor-Id in this Grouped AVP, from 1* in RFC 3588 to 1 in RFC 6773. This impacts the generated dictionary modules: Vendor-Id is expected to be list-valued in the 3588 dictionary, integer-valued in the 6733 dictionary. This, in turn, breaks the independence of capabilities configuration on a service or transport from the dictionary that will be used to encode an outgoing CER or CEA. This commit fixes this by massaging any Vendor-Specific-Application-Id config as appropriate when constructing CER or CEA for a given dictionary.
2013-03-18Update appupAnders Svensson
2013-03-17Specify timeouts to ct_slave:start/2Anders Svensson
2013-03-17More flexible distribution configAnders Svensson
Allow both share_peers and use_shared_peers to be a list of nodes, or a function that returns a list of nodes.
2013-03-17Add distribution suiteAnders Svensson
2013-03-17Document distribution configAnders Svensson
2013-03-17Distribution fixesAnders Svensson
This is the functionality that allows transports to be shared between identically-named services on different nodes, which has been neither documented nor tested (until now).
2013-03-12Tweak okay -> suspect configAnders Svensson
Make it just a number of timeouts, without a new DWR being sent.
2013-03-12Add testcases for watchdog_configAnders Svensson
2013-03-04Rework watchdog suite to remove most timing dependenciesAnders Svensson
Count watchdog messages instead when this is an alternative.
2013-03-04Rework stats to avoid concurrent read and writeAnders Svensson
Counters read by diameter:service_info(SvcName, transport) can be selected at the same time as the diameter_stats server is folding them into another key, possibly resulting in inaccurate values. Have diameter_stats select from the server process to avoid this and add diameter_stats:sum/1 to sum values from all contributors on a given term.
2013-03-04Minor spec fixAnders Svensson
2013-03-04Add transport_opt() watchdog_configAnders Svensson
To make the number of watchdogs sent before the transitions REOPEN -> OKAY and OKAY -> SUSPECT configurable. Using anything other then the default config is non-standard and should only be used for test.
2013-02-25Prepare releaseOTP_R16BErlang/OTP
2013-02-23Merge branch 'anders/diameter/SoC/OTP-10688'Anders Svensson
* anders/diameter/SoC/OTP-10688: Add RFC 6733 commentary to SoC chapter Add RFC 6737 Capabilities Update dictionary Remove cruft from doc Makefile
2013-02-22Add RFC 6733 commentary to SoC chapterAnders Svensson
The commentary is not yet complete. It currently stops at chapter 4 of the RFC.
2013-02-22Update copyright yearsBjörn-Egil Dahlberg
2013-02-20Add RFC 6737 Capabilities Update dictionaryAnders Svensson
Although it's neither built nor supported in code yet.
2013-02-20Remove cruft from doc MakefileAnders Svensson
2013-02-18vsn -> 1.4.1Anders Svensson
2013-02-18Update appup for diameter-1.4.1 in R16BAnders Svensson
Also add comments to identify the corresponding OTP releases. Purposely don't use regexp version numbers to be explicit about previously released versions. (Could use them in one direction but then app suite needs to be adapted.)
2013-02-18Add cover target to test/MakefileAnders Svensson
2013-02-18Make tweaksAnders Svensson
Add a 'strict' target to compile with -Werror and fix a dependency. Reorder test suites alphabetically. The two suites that currently take the longest to run conveniently come last.
2013-02-18Remove dialyzer nowarn_unused_function workaroundAnders Svensson
The workaround (commit 57d5564f) was to dialyzer only understanding nowarn_unused_function on individual functions. This is no longer the case as of R15B01 (commit 477fd95a).
2013-02-17Add testcases for application_opt() request_errors = answerAnders Svensson
2013-02-17Answer 5xxx errors with application_opt() request_errors = answerAnders Svensson
RFC 3588 allowed only 3xxx result codes in an answer-message (that is, an answer that sets the E-bit) while RFC 6733 also allows 5xxx result codes. Setting request_errors = answer tells diameter to answer 5xxx errors itself. Returning {answer_message, integer()} from a handle_request callback allows both 3xxx and 5xxx result codes to be set. {protocol_error, integer()} is retained for 3xxx result codes.
2013-02-16Comments and minor Result-Code fixAnders Svensson
In particular, don't put an error tuple in the errors field of a #diameter_packet{} when Result-Code and the E-bit are in conflict, put {integer(), #diameter_avp{}}.
2013-02-16Add testcases to 3xxx suiteAnders Svensson
2013-02-16Minor traffic suite fixAnders Svensson
2013-02-16Be less brutal in setting Result-Code/Failed-AVPAnders Svensson
When receiving a request for which errors have been detected during decode, diameter previously used the errors list in the decoded diameter_packet record to unconditionally set Result-Code and Failed-AVP in the outgoing answer. It wasn't particularly delicate in doing so however and would happily set a 5xxx Result-Code even if a handle_request callback returned an answer-message, leading to an encode error. This behaviour became even less endearing as of commit ac452e28, which made it possible to handle_request to take place even for protocol errors. (ie. When a callback typically should return an answer-message.) This commit fixes the behaviour by only setting a value that's appropriate for the answer in question, either a 3xxx or a 5xxx, depending on if the answer's an answer-message or not. It also allows handle_request to prevent diameter from setting anything by setting errors = false in a returned diameter_packet. Ideally it should have been errors = [] but the empty list is the default value for the errors field and changing the default (ideally there shouldn't have been one) would require recompilation of all modules including diameter.hrl: choose the less attractive 'false' to avoid such backwards incompatibility. The request reception is also refactored somewhat to shorten some call chains.
2013-02-16Add 3xxx suite for testing application_opt() request_errorsAnders Svensson
2013-02-16Minor suite simplificationAnders Svensson
2013-02-16Add application_opt() request_errorsAnders Svensson
Configuring the value 'callback' all errors detected in incoming requests to result in a handle_request callback. The default value 'answer_3xxx' is the previous behaviour in which diameter answers protocol errors without a callback.