Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.)
|
|
|
|
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.
|
|
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).
|
|
|
|
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.
|
|
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{}}.
|
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
* anders/diameter/message_length/OTP-10687:
Add length suite for testing Message Length errors
Fix test/depend.mk blunder
Add transport_opt() length_errors
Only start a fragment timer when there's something to flush
Simplify and document diameter_tcp fragment timer
Comment fix
Remove upgrade code not needed after application restart
|
|
* anders/diameter/rfc6733_dictionaries/OTP-10760:
Remove trailing whitespace
Tweak service interface towards diameter_peer
Split message handling in diameter_service into diameter_traffic
Simplify request record
Move failover out of service process
Update traffic suite to test both RFC 3588 and 6733 dictionaries
Update capx suite to test both RFC 3588 and 6733 dictionaries
Add exprecs '#new-'/1 clause taking list argument
Add exprecs '#get-'/1 for transforming records into lists
Document the existence of the RFC 6733 dictionaries
Don't hardcode common dictionary
Add RFC 6733 dictionaries
|
|
* anders/diameter/reopen/OTP-10692:
Fix testcases in event suite
Fix faulty watchdog transition INITIAL -> DOWN
Fix faulty watchdog transition DOWN -> INITIAL
Comment fixes
Rename records peer/conn -> watchdog/peer in diameter_service
Add testcases to traffic suite
Simplify watchdog transitions in service process
Simplify transport shutdown
Remove upgrade code not needed after application restart
Tweak (make) silent rules support
|
|
|
|
Beam path in dependency was wrong.
|
|
The value determines whether or not an unexpected message length in the
header of an incoming messages causes the peer process to exit, the
message to be discarded or handled as usual. The latter may only be
appropriate for message-oriented transport (eg. SCTP) since
stream-oriented transport (eg. TCP) may not be able to recover the
message boundary once a length error has occurred.
|
|
|
|
Don't start a new timer with each incoming message. Instead, start a
timer at timeout and flush after two successive timeouts with no message
reception.
|
|
|
|
Which will be the case in R16B.
|
|
* anders/diameter/cover/OTP-10804:
Update diameter.cover
|
|
|
|
|
|
Traffic handling is connected to the service implementation through the
pick_peer callback and failover but diameter_service was getting
unwieldy as home to both the service process and traffic handling.
|
|
In particular, remove fields containing values that are known (as of the
preceding commit) to the request process.
|
|
In order to be able to remove fields from the request process that don't
need to be there and do less in the service process. The pick_peer
callback now takes place in the request process in the case of immutable
state, just as in the case of the initial send.
|
|
|
|
|
|
As an inverse to '#get-'/1 in the preceding commit.
|
|
The generated '#get-'/1 has one clause for each exported record r, whose
definition is equivalent to the following.
'#get-'(#r{} = Rec) ->
[r | lists:zip(record_info(r, fields), tl(tuple_to_list(Rec)))];
The record name at the head of the list is the same format that diameter
accepts for outgoing message.
|
|
|
|
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).
|
|
The RFC 6733 accounting dictionary includes rfc6733 in its name. The RFC
3588 dictionary doesn't and is left as-is for backwards compatibility.
|
|
The transition INITIAL -> DOWN (fixed in the preceding commit) was
wrong.
|
|
There is no such transition in RFC 3539, the state remains in INITIAL.
|
|
This was the result of the watchdog process exiting as a consequence of
peer death in some casesi, causing a restarted transport to enter
INITIAL when it should enter REOPEN. The watchdog now remains alive as
long as peer shutdown isn't requested and a 'close' message to the
service process (instead of watchdog death) generates 'closed' events
from the service.
|
|
|
|
That is, make the naming match that of the corresponding modules.
This has long been fairly confusing.
|
|
That check for unexpected entries in the request table.
|
|
In particular, use watchdog messages as input and do away with the older
connection_up/down (and other) messages. Also, only maintain the
watchdog state, not the older up/down op state.
|
|
Service process informs the watchdog process which informs the peer
process. (Instead of going directly to the latter in one case.)
|
|
Which will be the case with R16B in this case.
|
|
|
|
|
|
|