aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
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-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.
2013-04-19Merge branch 'fredrik/ssh/unicode_adapt' into maintFredrik Gustafsson
* fredrik/ssh/unicode_adapt: ssh: unicode adaptions
2013-04-19Merge branch 'anders/diameter/mkdir_race/OTP-11051' into maintAnders Svensson
* anders/diameter/mkdir_race/OTP-11051: Fix mkdir race
2013-04-19[common_test] Adjusted timers in ct_repeat_testrun_SUITESiri Hansen
This is to allow slower test hosts.
2013-04-19[common_test] Extend timer in cover_SUITE for slow test hostSiri Hansen
2013-04-19[sasl] Remove compiler warning in release_handler_SUITESiri Hansen
2013-04-19[common_test] Kill slave nodes after test cases in cover_SUITESiri Hansen
The test case cover_SUITE:slave_start_slave often fails on a test host (windows) due to a hanging node from an earlier test run. In the first test, the slave fails to start (boot_timeout?) and is never connected to the test node. The attempt at cleaning up used nodes() to find which slaves to kill - so in the case where the slave was never connected it was never killed. This is no changed so each slave is explicitly killed by name - no matter if it is pingable or not.
2013-04-19[reltool] Remove erlang:port_close/1 for node portSiri Hansen
Test nodes are started with erlang:open_port/2, using the -detached option to erl. -detached causes the port returned from open_port/2 to be closed automatically. Some test cases failed occasionally with a badarg when attempting to close the port with erlang:port_close/1. To avoid this the call to port_close/1 is now removed.
2013-04-19fix excessive CPU consumption of timer_serverAliaksey Kandratsenka
I've found stdlib's timer to burn CPU without good reason. Here's what happens. The problem is that it sleeps in milliseconds but computes time in microseconds. And there is bug in code to compute milliseconds to sleep. It computes microseconds difference between now and nearest timer event and then does _truncating_ division by 1000. So on average it sleeps 500 microseconds _less than needed_. On wakeup its checks do I have timer tick that already occurred? No. Ok how much I need to sleep ? It does that bad computation again and gets 0 milliseconds. So next gen_server timeout happens right away only to find we're still before closest timer tick and to decide to sleep 0 milliseconds again. And again and again. This commit changes division to pick ceiling of ratio rather than floor. So that we always sleep not less then difference between now and closest event time.
2013-04-18Fix mkdir raceAnders Svensson
Creating examples/code and examples/dict in parallel can fail when examples doesn't exists. This has been seen on FreeBSD.
2013-04-18Merge branch 'maint-r16' into maintBjörn Gustavsson
* maint-r16: Prepare release Prepare release Do not count offline run-queues as empty Prepare release Prevent loss of objects after the extension marker Don't lose the extension mark for object set parameters Conflicts: erts/vsn.mk
2013-04-18Prepare releaseErlang/OTP
2013-04-18Merge branch 'siri/ct/error-printout-link/OTP-11044' into maintSiri Hansen
* siri/ct/error-printout-link/OTP-11044: [common_test] Add link from red error notification to full error description [common_test] Use max importance when logging errors
2013-04-18Merge branch 'siri/doc-fnu-opts/OTP-10901' into maintSiri Hansen
* siri/doc-fnu-opts/OTP-10901: Add documentation of w, i and e addition to +fnu and +fna switches to erl
2013-04-18Merge branch 'fredrik/inets/unblock_timer' into maintFredrik Gustafsson
* fredrik/inets/unblock_timer: inets: stop block timer with the right arguments
2013-04-17Add documentation of w, i and e addition to +fnu and +fna switches to erlSiri Hansen
These were documented in the stdlib user's guide, but not in the reference manual for erl. This has now been corrected.
2013-04-17Bug fixes in Common Test log cachePeter Andersson
2013-04-17Merge branch 'peppe/common_test/log_cache' into maintPeter Andersson
* peppe/common_test/log_cache: Implement cache for the CT logger OTP-10855
2013-04-17Implement cache for the CT loggerPeter Andersson
OTP-10855
2013-04-17Merge branch 'bjorn/fix-encoding/OTP-11041' into maintBjörn Gustavsson
* bjorn/fix-encoding/OTP-11041: Encode Erlang source files with non-ascii characters in UTF-8
2013-04-17Encode Erlang source files with non-ascii characters in UTF-8Björn Gustavsson
To ensure that 'master' compiles when we merge 'maint' to it, regardless of which encoding is default in 'master', all source files with non-ascii characters *must* have the encoding specified.
2013-04-16Merge branch 'bjorn/asn1/fix-lost-extension-mark/OTP-10995' into maint-r16Erlang/OTP
* bjorn/asn1/fix-lost-extension-mark/OTP-10995: Prevent loss of objects after the extension marker Don't lose the extension mark for object set parameters
2013-04-16[common_test] Add link from red error notification to full error descriptionSiri Hansen
In test case log, the red error notification may sometimes be truncated. This commit adds a link from this printout to the end of the log where the full error description and stacktrace i written.
2013-04-16[common_test] Use max importance when logging errorsSiri Hansen
This commit adds ?MAX_IMPORTANCE to error notifications in the test case log, and it makes sure that the printout says "CT Error Notification". Printouts from cth_log_redirect (sasl and error_reports) uses ?STD_IMPORTANCE and states "System" in the printout.
2013-04-15ssh: unicode adaptionsFredrik Gustafsson
2013-04-15Merge branch 'jaf/fix-supervisor-multi-restart/OTP-11042' into maintFredrik Gustafsson
2013-04-15Merge branch 'lh/demonitor-flush/OTP-11039' into maintFredrik Gustafsson
* lh/demonitor-flush/OTP-11039: Use erlang:demonitor(Ref, [flush]) where applicable
2013-04-15Merge branch 'nox/file-receive-optim/OTP-11040' into maintFredrik Gustafsson
* nox/file-receive-optim/OTP-11040: Optimize communication with file io server
2013-04-15inets: stop block timer with the right argumentsFredrik Gustafsson
2013-04-12Merge branch 'anders/diameter/watchdog_leak/OTP-11019' into maintAnders Svensson
* anders/diameter/watchdog_leak/OTP-11019: Minor doc fix Add testcase to exercise reconnect behaviour Fix watchdog table leak
2013-04-12Merge branch 'anders/diameter/address_config/OTP-10986' into maintAnders Svensson
* anders/diameter/address_config/OTP-10986: Comment fix More robust listening port lookup in test suites Update example client to allow default local address Make explicit local address to diameter_tcp:start/3 optional Add transport interface 'connected' message with local address list
2013-04-11Minor doc fixAnders Svensson
2013-04-11Add testcase to exercise reconnect behaviourAnders Svensson
2013-04-11Merge branch 'lh/otp-optims/OTP-11035' into maintFredrik Gustafsson
* lh/otp-optims/OTP-11035: Use erlang:demonitor's flush option on timeout Don't lookup the node unless required in gen:call/{3,4}
2013-04-11Merge branch 'fredrik/ct/telnet_wo_line_breaks/OTP-10085' into maintFredrik Gustafsson
2013-04-11Comment fixAnders Svensson
2013-04-11More robust listening port lookup in test suitesAnders Svensson
In particular, remove timing dependence by using diameter_reg:wait/1 to wait on the term registered by diameter_{tcp,sctp} when opening a listening socket.
2013-04-11Update example client to allow default local addressAnders Svensson
Note that the semantics of client:connect/1 have changed slightly: the second element in an argument 3-tuple is a remote address, the local address being the transport module's default. Previously it was interpreted as a common local/remote address.
2013-04-11Make explicit local address to diameter_tcp:start/3 optionalAnders Svensson
Use the default address address (as selected by gen_tcp) if none is configured, passing it in the new 'connected' message introduced by the previous commit. The corresponding update to diameter_sctp has to wait until problems with inet:sockname/1 are resolved: the function currently only returns one address, and sometimes {0,0,0,0}. See OTP-11018.
2013-04-11Add transport interface 'connected' message with local address listAnders Svensson
A transport module can return a local address list from its start/3 function in order to specify addresses to be used as Host-IP-Address during capabilities exchange. Now allow addresses to be communicated in a 'connected' message in the case of a connecting transport, so that diameter_tcp (in particular) can make local address configuration optional, communicating the gen_tcp default after connection establishment instead.
2013-04-11Optimize communication with file io serverAnthony Ramine
The file module communicates with a file io server with the following protocol for file operations: > {file_request,From,ReplyAs,Request} < {file_reply,ReplyAs,Reply} The ReplyAs value is sent by the client side to match against when receiving the reply and is otherwise left untouched and passed as is by the server. This commit enables receive optimizations by using the reference of the server monitor, changing the protocol to: > {file_request,From,MonitorRef,Request} < {file_reply,MonitorRef,Reply} As the shape of the messages is not changed, backwards compatibility is not a concern.
2013-04-11Merge branch 'sverk/dets_remove_test_otp_9607' into maintSverker Eriksson
* sverk/dets_remove_test_otp_9607: stdlib: Fix unstable testcase ets_SUITE:delete_large_named_table stdlib: Remove obsolete testcase dets_SUITE:otp_9607
2013-04-11Merge branch 'ks/hipe-cleanup-escaping/OTP-11031' into maintFredrik Gustafsson
* ks/hipe-cleanup-escaping/OTP-11031: Loosen the assumptions of code that handles escaping functions