summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test ets doc updatesverker-ets-patch-1Sverker Eriksson2018-09-171-1/+1
|
* Merge branch 'raimo/receive-TOS-TCLASS/ERIERL-187/OTP-15145' into maintRaimo Niskanen2018-09-1716-141/+1294
|\ | | | | | | | | | | | | | | * raimo/receive-TOS-TCLASS/ERIERL-187/OTP-15145: Write testcases for recvtos and friends Fix term buffer overflow bug Fix documentation due to feedback Implement socket option recvtos and friends
| * Write testcases for recvtos and friendsRaimo Niskanen2018-09-172-1/+369
| | | | | | | | | | Use os:type() and os:version() to predict if the individual options are supposed to be supported. We'll see if this holds.
| * Fix term buffer overflow bugRaimo Niskanen2018-09-111-4/+10
| |
| * Fix documentation due to feedbackRaimo Niskanen2018-09-051-3/+1
| |
| * Implement socket option recvtos and friendsRaimo Niskanen2018-09-0415-141/+922
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement socket options recvtclass, recvtos, recvttl and pktoptions. Document the implemented socket options, new types and message formats. The options recvtclass, recvtos and recvttl are boolean options that when activated (true) for a socket will cause ancillary data to be received through recvmsg(). That is for packet oriented sockets (UDP and SCTP). The required options for this feature were recvtclass and recvtos, and recvttl was only added to test that the ancillary data parsing handled multiple data items in one message correctly. These options does not work on Windows since ancillary data is not handled by the Winsock2 API. For stream sockets (TCP) there is no clear connection between a received packet and what is returned when reading data from the socket, so recvmsg() is not useful. It is possible to get the same ancillary data through a getsockopt() call with the IPv6 socket option IPV6_PKTOPTIONS, on Linux named IPV6_2292PKTOPTIONS after the now obsoleted RFC where it originated. (unfortunately RFC 3542 that obsoletes it explicitly undefines this way to get packet ancillary data from a stream socket) Linux also has got a way to get packet ancillary data for IPv4 TCP sockets through a getsockopt() call with IP_PKTOPTIONS, which appears to be Linux specific. This implementation uses a flag field in the inet_drv.c socket internal data that records if any setsockopt() call with recvtclass, recvtos or recvttl (IPV6_RECVTCLASS, IP_RECVTOS or IP_RECVTTL) has been activated. If so recvmsg() is used instead of recvfrom(). Ancillary data is delivered to the application by a new return tuple format from gen_udp:recv/2,3 containing a list of ancillary data tuples [{tclass,TCLASS} | {tos,TOS} | {ttl,TTL}], as returned by recvmsg(). For a socket in active mode a new message format, containing the ancillary data list, delivers the data in the same way. For gen_sctp the ancillary data is delivered in the same way, except that the gen_sctp return tuple format already contained an ancillary data list so there are just more possible elements when using these socket options. Note that the active mode message format has got an extra tuple level for the ancillary data compared to what is now implemented gen_udp. The gen_sctp active mode format was considered to be the odd one - now all tuples containing ancillary data are flat, except for gen_sctp active mode. Note that testing has not shown that Linux SCTP sockets deliver any ancillary data for these socket options, so it is probably not implemented yet. Remains to be seen what FreeBSD does... For gen_tcp inet:getopts([pktoptions]) will deliver the latest received ancillary data for any activated socket option recvtclass, recvtos or recvttl, on platforms where IP_PKTOPTIONS is defined for an IPv4 socket, or where IPV6_PKTOPTIONS or IPV6_2292PKTOPTIONS is defined for an IPv6 socket. It will be delivered as a list of ancillary data items in the same way as for gen_udp (and gen_sctp). On some platforms, e.g the BSD:s, when you activate IP_RECVTOS you get ancillary data tagged IP_RECVTOS with the TOS value, but on Linux you get ancillary data tagged IP_TOS with the TOS value. Linux follows the style of RFC 2292, and the BSD:s use an older notion. For RFC 2292 that defines the IP_PKTOPTIONS socket option it is more logical to tag the items with the tag that is the item's, than with the tag that defines that you want the item. Therefore this implementation translates all BSD style ancillary data tags to the corresponding Linux style data tags, so the application will only see the tags 'tclass', 'tos' and 'ttl' on all platforms.
* | Merge branch 'bmk/snmp/20180907/atl_conversion_failure/OTP-15287' into maintMicael Karlberg2018-09-176-245/+313
|\ \
| * | [snmp] Add proper versionMicael Karlberg2018-09-173-14/+11
| | | | | | | | | | | | | | | | | | Also fixed case clause. OTP-15287 (ERIERL-206)
| * | [snmp] Update copyright end dateMicael Karlberg2018-09-075-5/+5
| | | | | | | | | | | | OTP-15287 (ERIERL-206)
| * | [snmp] Updated doc for atl conversion functionsMicael Karlberg2018-09-073-38/+65
| | | | | | | | | | | | OTP-15287 (ERIERL-206)
| * | [snmp] Corrected (agent) ATL logging of outgoing messagesMicael Karlberg2018-09-071-62/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some outgoing messages (not response) the following error(s) has been corrected: * encrypted: logged incorrectly, should have written the v3-header and the scoped pdu, but was actually logged as-is (encrypted), making conversion impossible. * un-encrypted: messages was not logged at all. OTP-15287 (ERIERL-206)
| * | [snmp] Improved Audit Trail Log conversion failureMicael Karlberg2018-09-071-138/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If conversion of an Audit Trail Log (ATL) entry failed, this could result in an abort of the entire conversion, not just the one entry. This has now been improved so that the failure now results in a "error message" into the "stream". Furthermore, we now keep track of the number of entries we succeede and fail to convert. OTP-15287 (ERIERL-206)
* | | Merge branch 'bmk/snmp/20180910/compiler_version_printout/OTP-15290' into maintMicael Karlberg2018-09-172-7/+3
|\ \ \
| * | | [snmp] Updated versionMicael Karlberg2018-09-171-2/+2
| | | | | | | | | | | | | | | | OTP-15290
| * | | [snmp|compiler] Spurious version message removedMicael Karlberg2018-09-171-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The snmp mib compiler printed an spurious version message if the 'version' option was provided. OTP-15290
* | | | Merge branch 'hasse/kernel/adjust_tests' into maintHans Bolinder2018-09-172-41/+88
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * hasse/kernel/adjust_tests: kernel: Adjust disk_log tests kernel: Adjust global testcase
| * | | | kernel: Adjust disk_log testsHans Bolinder2018-07-021-25/+74
| | | | |
| * | | | kernel: Adjust global testcaseHans Bolinder2018-06-291-16/+14
| | | | |
* | | | | Merge branch 'siri/logger/post-21-continues/OTP-15132' into maintSiri Hansen2018-09-1720-296/+566
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * siri/logger/post-21-continues/OTP-15132: [logger] Read config before terminating handler process [error_logger] Handle report_cb with arity 2 [proc_lib] Improve crash reports for single line logging [logger] Include single_line option to report_cb [logger] Check for deadlock when removing filters [logger] Fix spec for handler callbacks to always return ok [logger] Increase timetrap timer for handler_requests_under_load test [logger] Improve code coverage in test [logger] Refactor, and add error detection for configuration [logger] Fix logger_disk_log_h_SUITE:sync and add som debug info [logger] Update doc about file options in logger_std_h [logger] Remove encoding option from logger_formatter Remove outdated reference to error loggers [logger] Refactor some logger internals
| * | | | | [logger] Read config before terminating handler processSiri Hansen2018-09-143-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a handler process is terminated due to overload, it reads its configuration from the configuration database, so it can be restarted with the same configuration after a small delay. This was earlier done in a different process, which was spawned off from the terminate function. This caused a race condition, where in some cases, the configuration was already removed before it could be read. The reason for spawning off a process, is to avoid a deadlock due to the call to logger:remove_handler/1. This commit moves the call to logger:get_handler_config/1 back to the handler process - to ensure that the data is still there, but keeps the call to logger:remove_handler/1 in the spawned off process - to avoid deadlock.
| * | | | | [error_logger] Handle report_cb with arity 2Siri Hansen2018-09-121-8/+21
| | | | | |
| * | | | | [proc_lib] Improve crash reports for single line loggingSiri Hansen2018-09-121-26/+65
| | | | | |
| * | | | | [logger] Include single_line option to report_cbSiri Hansen2018-09-123-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the report callback function has two arguments, the second argument is a map with options to limit the size of the log event. To even allow a better formatting when the event shall be printed on a single line, the new option single_line is now included in this argument.
| * | | | | [logger] Check for deadlock when removing filtersSiri Hansen2018-09-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a filter fails, it is removed by a call to logger:remove_filter/1,2. If the log event that caused the failure was issued on the logger process itself, this would earlier cause a deadlock due to a gen_server:call to self(). This is now prevented.
| * | | | | [logger] Fix spec for handler callbacks to always return okSiri Hansen2018-09-122-2/+2
| | | | | |
| * | | | | [logger] Increase timetrap timer for handler_requests_under_load testSiri Hansen2018-09-121-1/+1
| | | | | |
| * | | | | [logger] Improve code coverage in testSiri Hansen2018-09-123-5/+15
| | | | | |
| * | | | | [logger] Refactor, and add error detection for configurationSiri Hansen2018-09-124-70/+310
| | | | | |
| * | | | | [logger] Fix logger_disk_log_h_SUITE:sync and add som debug infoSiri Hansen2018-09-121-35/+27
| | | | | |
| * | | | | [logger] Update doc about file options in logger_std_hSiri Hansen2018-09-121-7/+16
| | | | | |
| * | | | | [logger] Remove encoding option from logger_formatterSiri Hansen2018-09-128-63/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The encoding option was introduced in commit 270d909696a753af022df72a404c73f2895b4a02, to allow report callbacks to format according to a given encoding. There was, however, no connection between this encoding option, and the encoding of the device to which the logger handler was writing. Since a formatter is defined to return unicode:chardata(), and in order to avoid mismatch with the encoding of the device, the encoding option is now removed from the formatter. The handler itself must make sure that it does not write illegal data to its device.
| * | | | | Remove outdated reference to error loggersSiri Hansen2018-09-121-1/+1
| | | | | |
| * | | | | [logger] Refactor some logger internalsSiri Hansen2018-09-127-74/+44
| | | | | |
* | | | | | Merge branch 'john/erts/improve-list-reverse-trapping/OTP-15199' into maintJohn Högberg2018-09-174-59/+107
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * john/erts/improve-list-reverse-trapping/OTP-15199: Improve trapping in lists:reverse/2 Fix unsafe use of lists:reverse/1
| * | | | | | Improve trapping in lists:reverse/2John Högberg2018-09-132-58/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the process had more free space than reductions it could run a lot longer than it was supposed to. It didn't honor the number of reductions going in either, nor did it bump reductions when returning its result or erroring out. This commit also removes this function from a work function in scheduler_SUITE as it's extremely sensitive to the number of reductions spent in the test, causing equal_and_high_with_part_time_max to fail on some machines.
| * | | | | | Fix unsafe use of lists:reverse/1John Högberg2018-09-132-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We said reverse/2 but used reverse/1 which is unsafe to use in preloaded modules. This didn't have any effect in practice as the affected functions weren't used before the code server was started, but it's still an error.
* | | | | | | Merge branch 'rickard/conf-pgo/OTP-15282' into maintRickard Green2018-09-171-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rickard/conf-pgo/OTP-15282: Fix PGO configure test
| * | | | | | | Fix PGO configure testRickard Green2018-09-061-1/+1
| | | | | | | |
* | | | | | | | Merge branch 'hans/crypto/aes_ccm/OTP-15286' into maintHans Nilsson2018-09-1734-149/+33052
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hans/crypto/aes_ccm/OTP-15286: crypto: Fix no_aead test crypto: Document AES_CCM and fix errors in User's Guide The sizes in the Algorithms chapter for aes_gcm was wrong or incomplete. crypto: AES_CCM test case crypto: All aes_ccm vectors (including unused) This directory contains all aes_ccm vectors. However, effort is needed to include them in the test suite so they are left for later. crypto: Add AES_CCM crypto Will be increase interoperability of future SSL application versions. crypto: Generalize aes_gcm_(de|en)crypt nifs
| * | | | | | | | crypto: Fix no_aead testHans Nilsson2018-09-141-3/+9
| | | | | | | | |
| * | | | | | | | crypto: Document AES_CCM and fix errors in User's GuideHans Nilsson2018-09-142-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sizes in the Algorithms chapter for aes_gcm was wrong or incomplete.
| * | | | | | | | crypto: AES_CCM test caseHans Nilsson2018-09-1410-35/+11143
| | | | | | | | |
| * | | | | | | | crypto: All aes_ccm vectors (including unused)Hans Nilsson2018-09-1420-0/+21708
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This directory contains all aes_ccm vectors. However, effort is needed to include them in the test suite so they are left for later. The aes_ccm cipher is already covered by the vectors in crypt_SUITE_data Source: https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program
| * | | | | | | | crypto: Add AES_CCM cryptoHans Nilsson2018-09-142-19/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Will be increase interoperability of future SSL application versions.
| * | | | | | | | crypto: Generalize aes_gcm_(de|en)crypt nifsHans Nilsson2018-09-142-93/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EVP_CIPHER_CTX interface aims at enabling using the same code for many ciphers. Since we are going to add aes_ccm which is similar to aes_gcm, this commit is a preparation. It creates the aead_(de|en)crypt nifs and removes the old ones.
* | | | | | | | | Merge branch 'hans/crypto/rsassa_pss/OTP-15260' into maintHans Nilsson2018-09-173-11/+52
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hans/crypto/rsassa_pss/OTP-15260: crypto: Add forgotten #ifdef MAY prevent compilation errors if the symbol is configured to not be defined in an OpenSSL version where it exists by default. crypto: Change condition for RSA_PKCS1_PSS Trubble on a couple of cross-building machines crypto: RSA options list disclaimer in documentation for crypto:supports/0 The final appearence of the rs_opts entry is still not completly decided. crypto: Add 'rsa_opts' to crypto:supports/0 Needed in future versions of the SSL application.
| * | | | | | | | crypto: Add forgotten #ifdefHans Nilsson2018-09-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAY prevent compilation errors if the symbol is configured to not be defined in an OpenSSL version where it exists by default.
| * | | | | | | | crypto: Change condition for RSA_PKCS1_PSSHans Nilsson2018-09-141-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trubble on a couple of cross-building machines
| * | | | | | | | crypto: RSA options list disclaimer in documentation for crypto:supports/0Hans Nilsson2018-09-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The final appearence of the rs_opts entry is still not completly decided.
| * | | | | | | | crypto: Add 'rsa_opts' to crypto:supports/0Hans Nilsson2018-09-142-11/+48
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Needed in future versions of the SSL application.