aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-03-25erts: Combine flat and hash maps under one unifying tagBjörn-Egil Dahlberg
2015-03-25Merge branch 'sverk/hamt-term2bin-bug/OTP-12585'Sverker Eriksson
* sverk/hamt-term2bin-bug/OTP-12585: erts: Optimize hashmap_get erts: Remove HAMT_SUBTAG_NODE_ARRAY erts: Fix bug in binary_to_term for hamt when yielding erts: Rename to flatmap_from_validated_list
2015-03-25Merge branch 'maint'Björn-Egil Dahlberg
Conflicts: erts/emulator/beam/erl_map.c erts/emulator/test/map_SUITE.erl
2015-03-25Merge branch 'egil/fix-term-cmp/OTP-12623' into maintBjörn-Egil Dahlberg
* egil/fix-term-cmp/OTP-12623: erts: Fix comparison of exact terms
2015-03-25Merge branch 'maint'Erland Schönbeck
2015-03-25Merge branch 'erland/diameter/time_api_change/OTP-12439' into maintErland Schönbeck
* erland/diameter/time_api_change/OTP-12439: Update with changes in new time api otp_SUITE: change filter för diameter
2015-03-24erts: Optimize hashmap_getSverker Eriksson
2015-03-24erts: Remove HAMT_SUBTAG_NODE_ARRAYSverker Eriksson
This will also fix a bug in term_to_binary treating full nodes as tuples and emiting LIST_EXT for leafs.
2015-03-24erts: Fix bug in binary_to_term for hamt when yieldingSverker Eriksson
Must save hamt_list in context.
2015-03-24erts: Fix comparison of exact termsBjörn-Egil Dahlberg
Comparison of exact terms could cause faulty term tests. This was caused by a faulty (too small) internal type. Symptom: -1 = erts_internal:cmp_term(2147483648,0). %% wrong Correct: 1 = erts_internal:cmp_term(2147483648,0). Reported-by: Jesper Louis Andersen
2015-03-24Merge branch 'rickard/time_api/OTP-11997'Rickard Green
* rickard/time_api/OTP-11997: Better OS system time implementation Documentation adjustments Fix zero timout timers erts_sys_hrtime() for lcnt Better support for poor os monotonic sources Conflicts: erts/preloaded/ebin/erlang.beam
2015-03-24Better OS system time implementationRickard Green
2015-03-24Merge branch 'maint'Anders Svensson
2015-03-24Merge branch 'anders/diameter/17.5/OTP-12435' into maintAnders Svensson
* anders/diameter/17.5/OTP-12435: vsn -> 1.9 Update appup for 17.5 Minor doc fix
2015-03-24vsn -> 1.9Anders Svensson
2015-03-24Update appup for 17.5Anders Svensson
Required load order by ticket. - OTP-11492, answer messages discarded - OTP-12415, retransmission failure - OTP-12475, grouped AVP decode - OTP-12543, no requests after DPR none - OTP-12412, shutdown issues diameter_lib diameter_service - OTP-12428, transport_opt() pool_size diameter_lib diameter_service diameter, diameter_config diameter_{tcp,sctp} diameter, diameter_config - OTP-12439, new time api in Erlang/OTP 18 diameter_lib diameter_{config,peer,reg,service,session,stats,sync,watchdog,sctp} - OTP-11952, service_opt() decode_string - OTP-12589, DiameterURI encode/decode diameter_{capx,codec,peer} diameter_types diameter_traffic diameter_{service,peer_fsm} diameter_watchdog diameter, diameter_config - OTP-12542, DPR with diameter:call/4 diameter_{peer_fsm,watchdog} diameter, diameter_config - OTP-12609, transport_opt() dpr_timeout diameter_peer_fsm diameter, diameter_config
2015-03-24Minor doc fixAnders Svensson
2015-03-24Merge branch 'maint'Anders Svensson
2015-03-24Merge branch 'anders/diameter/dpr/OTP-12609' into maintAnders Svensson
* anders/diameter/dpr/OTP-12609: Discard incoming/outgoing requests after incoming DPR Add transport_opt() dpr_timeout Be lenient with errors in incoming DPR
2015-03-24Merge branch 'anders/diameter/DiameterURI/OTP-12589' into maintAnders Svensson
* anders/diameter/DiameterURI/OTP-12589: Adapt to changed DiameterURI defaults in RFC 6733 Reject transport=udp;protocol=diameter at DiameterURI encode
2015-03-24Adapt to changed DiameterURI defaults in RFC 6733Anders Svensson
Despite claims of full backwards compatibility, the text of RFC 6733 changes the interpretation of unspecified values in a DiameterURI. In particular, 3588 says that the default port and transport are 3868 and sctp respectively, while 6733 says it's either 3868/tcp (aaa) or 5658/tcp (aaas). The 3588 defaults were used regardless, but now use them only if the common dictionary is diameter_gen_base_rfc3588. The 6733 defaults are used otherwise. This kind of change in the standard can lead to interop problems, since a node has to know which RFC its peer is following to know that it will properly interpret missing URI components. Encode of a URI includes all components to avoid such confusion. That said, note that the defaults in the diameter_uri record have *not* been changed. This avoids breaking code that depends on them, but the risk is that such code sends inappropriate values. The record defaults may be changed in a future release, to force values to be explicitly specified.
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-24Documentation adjustmentsRickard Green
2015-03-24Fix zero timout timersRickard Green
2015-03-23erts_sys_hrtime() for lcntRickard Green
2015-03-23erts: Rename to flatmap_from_validated_listSverker Eriksson
from map_to_validated_list
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-23Better support for poor os monotonic sourcesRickard Green
2015-03-23Merge branch 'maint'Anders Svensson
2015-03-23Merge branch 'maint'Erland Schönbeck
Conflicts: lib/ssh/test/ssh_basic_SUITE.erl
2015-03-23Update with changes in new time apiErland Schönbeck
otp_SUITE: change filter för diameter
2015-03-23Discard incoming/outgoing requests after incoming DPRAnders Svensson
With the same motivation as in commits 5bd2d72 and b1fd629. As in the latter, incoming DPR is the only exception.
2015-03-23Add transport_opt() dpr_timeoutAnders Svensson
To cause a peer connection to be closed following an outgoing DPA, in case the peer fails to do so. It is the recipient of DPA that should close the connection according to RFC 6733.
2015-03-23Be lenient with errors in incoming DPRAnders Svensson
To avoid having the peer interpret the error as meaning the connection shouldn't be closed, which probably does more harm than ignoring syntactic errors in the DPR. Note that RFC 6733 says this about incoming DPR, in 5.4 Disconnecting Peer Connections: Upon receipt of the message, the Disconnect-Peer-Answer message is returned, which SHOULD contain an error if messages have recently been forwarded, and are likely in flight, which would otherwise cause a race condition. The race here is presumably between answers to forwarded requests and the outgoing DPA, but we have no handling for this: whether or not there are pending answers is irrelevant to how DPR is answered. It's questionable that a peer should be able to prevent disconnection in any case: it has to be the node sending DPR that decides if it's approriate, and the peer should take it as an indication of what's coming. Incoming DPA is already treated leniently: the only error that's not ignored is mismatching End-to-End and Hop-by-Hop Identifiers, since there's no distinguishing an erroneous value from an unsolicited DPA. This mismatch could also be ignored, which is the case for DWA for example, but this problem is already dealt with by dpa_timeout, which causes a connection to be closed even when the expected DPA isn't received.
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-23Merge branch 'ia/ssl/dialyzer/alpn-and-crl'Ingela Anderton Andin
* ia/ssl/dialyzer/alpn-and-crl: ssl: Dialyzer fixes
2015-03-23ssl: Dialyzer fixesIngela Anderton Andin
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.