aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-03-24Reject transport=udp;protocol=diameter at DiameterURI encodeAnders Svensson
Both RFC 3588 and 6733 disallow the combination. Make its encode fail.
2015-03-24Merge branch 'anders/diameter/string_decode/OTP-11952' into maintAnders Svensson
* anders/diameter/string_decode/OTP-11952: Let examples override default service options Set {restrict_connections, false} in example server Set {string_decode, false} in examples Test {string_decode, false} in traffic suite Add service_opt() string_decode Strip potentially large terms when sending outgoing Diameter messages Improve language consistency in diameter(1)
2015-03-24Merge branch 'anders/diameter/route_record/OTP-12551' into maintAnders Svensson
* anders/diameter/route_record/OTP-12551: Fix ordering of AVPs in relayed messages
2015-03-24Let examples override default service optionsAnders Svensson
To make them a bit more flexible. Can now do things like this: server:start([{'Product-Name', "Bob"}]), server:listen({tcp, [{capx_timeout, 2000}]}) Beware that the latter is completely different from this: server:listen(tcp, [{capx_timeout, 2000}])
2015-03-24Set {restrict_connections, false} in example serverAnders Svensson
Since there's no reason to reject a client that wants to establish multiple connections, given that diameter can handle it.
2015-03-24Set {string_decode, false} in examplesAnders Svensson
So as to do what's now recommended in diameter(1), in the grandparent commit.
2015-03-24Test {string_decode, false} in traffic suiteAnders Svensson
By adding string decode or not in the server or client as another combination. Run all traffic cases in parallel: remove the sequential tests. Common test seems unable to deal with {group, X, [parallel]} within a group.
2015-03-24Add service_opt() string_decodeAnders Svensson
To control whether stringish Diameter types are decoded to string or left as binary. The motivation is the same as in the parent commit: to avoid large strings being copied when incoming Diameter messages are passed between processes; or *if* in the case of messages destined for handle_request and handle_answer callbacks, since these are decoded in the dedicated processes that the callbacks take place in. It would be possible to do something about other messages without requiring an option, but disabling the decode is the most effective. The value is a boolean(), true being the default for backwards compatibility. Setting false causes both diameter_caps records and decoded messages to contain binary() in relevant places that previously had string(): diameter_app(3) callbacks need to be prepared for the change. The Diameter types affected are OctetString and the derived types that can contain arbitrarily large values: OctetString, UTF8String, DiameterIdentity, DiameterURI, IPFilterRule, and QoSFilterRule. Time and Address are unaffected. The DiameterURI decode has been redone using re(3), which both simplifies and does away with a vulnerability resulting from the conversion of arbitrary strings to atom. The solution continues the use and abuse of the process dictionary for encode/decode purposes, last seen in commit 0f9cdba.
2015-03-23Strip potentially large terms when sending outgoing Diameter messagesAnders Svensson
Both incoming and outgoing Diameter messages pass through two or three processes, depending on whether they're incoming or outgoing: the transport process and corresponding peer_fsm process and (for incoming) watchdog processes. Since terms other than binary are copied when passing process boundaries, large terms lead to copying that can be problematic, if frequent enough. Since only the bin and transport_data fields of a diameter_packet record are needed by the transport process, discard others when sending outgoing messages. Strictly speaking, the statement that only the aforementioned fields are needed by the transport process depends on the transport process. It's true of those implemented by diameter (in diameter_tcp and diameter_sctp), but an implementation that makes use of other fields is assuming more than the documentation in diameter_transport(3) promises.
2015-03-23Merge branch 'anders/diameter/dpr/OTP-12542' into maintAnders Svensson
* anders/diameter/dpr/OTP-12542: Discard CER or DWR sent with diameter:call/4 Allow DPR to be sent with diameter:call/4 Add transport_opt() dpa_timeout Add testcase for sending DPR with diameter:call/4
2015-03-23Merge branch 'anders/diameter/dpr/OTP-12543' into maintAnders Svensson
* anders/diameter/dpr/OTP-12543: Discard incoming requests after outgoing DPR Discard outgoing requests after outgoing DPR
2015-03-23Merge branch 'erland/revert_time/OTP-12444' into maintErland Schönbeck
* erland/revert_time/OTP-12444: Revert "Use new time API and be back-compatible in ssh"
2015-03-23Fix ordering of AVPs in relayed messagesAnders Svensson
6.1.9 of RFC 6733 states this: A relay or proxy agent MUST append a Route-Record AVP to all requests forwarded. The AVP was inserted as the head of the AVP list, not appended, since the entire AVP list was reversed relative to the received order. Thanks to Andrzej Trawiński.
2015-03-22Discard CER or DWR sent with diameter:call/4Anders Svensson
These are requests that diameter itself sends. It's previously been possible to send them, but answers timed out at the caller since they were discarded in diameter_watchdog. Answers will still timeout, but now the requests are discarded before being sent.
2015-03-22Allow DPR to be sent with diameter:call/4Anders Svensson
DPR is sent by diameter at application shutdown, service stop, or transport removal. It has been possible to send the request with diameter:call/4, but the answer was discarded, instead of the transport process being terminated. This commit causes DPR to be handled in the same way regardless of whether it's sent by diameter or by diameter:call/4. Note that the behaviour subsequent to DPA is unchanged. In particular, in the connecting case, the closed connection will be reestablished after a connect_timer expiry unless the transport is removed. The more probable use case is the listening case, to disconnect a single peer associated with a listening transport.
2015-03-22Add transport_opt() dpa_timeoutAnders Svensson
To make the default DPA timeout configurable. The timeout say how many milliseconds to wait for DPA in response to an outgoing DPR before terminating the transport process regardless.
2015-03-22Add testcase for sending DPR with diameter:call/4Anders Svensson
That currently fails when the resulting DPA is regarded as unsolicited in diameter_peer_fsm, causing the request to timeout at the caller.
2015-03-22Discard incoming requests after outgoing DPRAnders Svensson
Since there's a race between an answer being sent and the connection being closed upon the reception of DPA that's likely to be lost, and because of the questionability of sending messages after DPR, as discussed in the parent commit. An exception is made for DPR so that simultaneous DPR in both directions doesn't result in it being discarded on both ends.
2015-03-22Discard outgoing requests after outgoing DPRAnders Svensson
RFC 6733 isn't terribly clear about what should happen to incoming or outgoing messages once DPR is sent and the Peer State Machine transitions into state Closing. There's no event for this in section 5.6, Peer State Machine, and no clarification in section 5.4, Disconnecting Peer Connections. There is a little bit of discussion in 2.1.1, SCTP Guidelines, in relation to unordered message delivery, but the tone there is that messages might be received after DPR because of unordered delivery, not because they were actually sent after DPR. Discarding outgoing answers may do more harm than good, but requests are more likely to be unexpected, as has been seen to be the case with DWR following DPR. DPR indicates a desire to close the connection: discard any subsequent outgoing requests.
2015-03-22Merge branch 'anders/diameter/17/time/OTP-12439' into maintAnders Svensson
* anders/diameter/17/time/OTP-12439: Adapt app suite to changes in time api
2015-03-22Merge branch 'anders/diameter/time/OTP-12439' into maintAnders Svensson
* anders/diameter/time/OTP-12439: Adapt to changes in time api
2015-03-20Merge branch 'nox/fix-port_info-race' into maintZandra Hird
* nox/fix-port_info-race: Fix a race condition when calling port_info/1 OTP-12587
2015-03-20Merge branch 'anders/diameter/pool/OTP-12428' into maintAnders Svensson
* anders/diameter/pool/OTP-12428: Add pool_size test to config suite
2015-03-20Add pool_size test to config suiteAnders Svensson
Overlooked in commit 4b691d8d.
2015-03-19Improve language consistency in diameter(1)Anders Svensson
Akin to commit 85d44b58.
2015-03-19Adapt to changes in time apiAnders Svensson
erlang:convert_time_resolution/3 has been renamed to convert_time_unit. erlang:time_resolution/0 has been removed: use new time resolution values instead.
2015-03-19Adapt app suite to changes in time apiAnders Svensson
erlang:time_resolution/0 has been removed, erlang:convert_time_resolution/3 has been renamed convert_time_unit, and {os,erlang}:system_time/0,1 have been added. Modify the list of ignored undefined function calls accordingly.
2015-03-19Merge branch 'johanclaesson/maint' into maintZandra Hird
* johanclaesson/maint: Fix tags completion in erlang.el for GNU Emacs 23+ OTP-12583
2015-03-19Merge branch 'kovyl2404/maint/cpu_sup_big_loadavg/OTP-12581' into maintBjörn-Egil Dahlberg
* kovyl2404/maint/cpu_sup_big_loadavg/OTP-12581: Handle big loadavg values correctly
2015-03-18Merge branch 'egil/dialyzer/fix-find_terminals/OTP-12577' into maintBjörn-Egil Dahlberg
* egil/dialyzer/fix-find_terminals/OTP-12577: dialyzer: Add missing clause for map in find_terminals
2015-03-18Handle big loadavg values correctlyViacheslav V. Kovalev
Do not crash with badmatch when integer part of loadavg has more than 2 digits.
2015-03-18Merge branch 'qrilka/patch-3' into maintZandra Hird
* qrilka/patch-3: Minor comment fix
2015-03-18Merge branch 'nlmills/cleanup' into maintZandra Hird
* nlmills/cleanup: Remove unused time macros from efile_drv
2015-03-18Merge branch 'jeffweiss/fix_eldap_doc_infinity_typo' into maintZandra Hird
* jeffweiss/fix_eldap_doc_infinity_typo: fix `infinity` typo in eldap docs
2015-03-18Merge branch 'wmalik/minor-fixes' into maintZandra Hird
* wmalik/minor-fixes: Fix proc_lib doc Remove commented out code Fix make_hash description
2015-03-18Fix a race condition when calling port_info/1Anthony Ramine
This variable hold the values returned by erlang:port_info/1 and shouldn't be static. Reported-by: Heinz Nikolaus Gies
2015-03-18Merge branch 'peppe/common_test/end_per_group_event' into maintPeter Andersson
* peppe/common_test/end_per_group_event: Always report ok to event handlers after successful cfg or tc func OTP-12279
2015-03-18Always report ok to event handlers after successful cfg or tc funcPeter Andersson
Also make sure test_server never reports failures that can be mistaken for positive results.
2015-03-18Merge branch 'peppe/common_test/change_pre_post_io_test_timing' into maintPeter Andersson
* peppe/common_test/change_pre_post_io_test_timing: Modify test timing by enabling time multiplier and scaling OTP-12574
2015-03-18Modify test timing by enabling time multiplier and scalingPeter Andersson
2015-03-18Merge remote-tracking branch 'origin/peppe/common_test/enable_time_scaling' ↵Peter Andersson
into maint * origin/peppe/common_test/enable_time_scaling: Enable timetrap scaling for all tests
2015-03-18Merge remote-tracking branch 'origin/peppe/fix_xcomp' into maintPeter Andersson
* origin/peppe/fix_xcomp: Modify the xcomp file for ARM and enable more flags Fix problem with variables not getting assigned during installation OTP-11441
2015-03-18Merge remote-tracking branch 'origin/peppe/common_test/tc_log_format' into maintPeter Andersson
* origin/peppe/common_test/tc_log_format: Modify the top section of the test case log file OTP-12518
2015-03-18Merge remote-tracking branch 'origin/peppe/common_test/log_cache_problem' ↵Peter Andersson
into maint * origin/peppe/common_test/log_cache_problem: Fix problem with directories not listed in expected order OTP-11400
2015-03-18Merge remote-tracking branch ↵Peter Andersson
'origin/peppe/common_test/ct_netconfc_action_ok' into maint * origin/peppe/common_test/ct_netconfc_action_ok: Handle {ok,Data} in RPC reply (decode_rpc_reply) OTP-12491
2015-03-18Merge remote-tracking branch 'origin/peppe/common_test/public_event_mgr' ↵Peter Andersson
into maint * origin/peppe/common_test/public_event_mgr: Add documentation Add API functions for reading CT event manager references OTP-12506
2015-03-18Enable timetrap scaling for all testsPeter Andersson
2015-03-18Merge branch 'hb/tools/unicode_fix/OTP-12567' into maintHans Bolinder
* hb/tools/unicode_fix/OTP-12567: tools: Fix a Unicode bug in the tags module
2015-03-17dialyzer: Add missing clause for map in find_terminalsBjörn-Egil Dahlberg
Reported-by: Ali Sabil
2015-03-17tools: Fix a Unicode bug in the tags moduleHans Bolinder