ssl: Preserve inet option order in emulated_options#10908
ssl: Preserve inet option order in emulated_options#10908zuiderkwast wants to merge 1 commit intoerlang:maintfrom
Conversation
CT Test Results 2 files 66 suites 26m 20s ⏱️ Results for commit c380a0d. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
|
@zuiderkwast Please base it so that it can be target for maint. (Or retarget if that is already the case) I think it is a bug that it does not work so we want to fix it for maint too. |
f65d56b to
adf3f59
Compare
|
Does not compile: |
|
Sorry for the typo(s). Shall I squash the commits and force-push? |
|
@zuiderkwast Yes please could also make sure that you base your branch on OTP-28.4.1-label as then I can piggyback it on an un-planned OTP-28 patch, as there are no more planned patches for 28 track. (It can still be targeted at maint here as it should merge cleanly). |
The emulated_options/3 function in tls_socket and dtls_socket used a prepend accumulator pattern without reversing the result, causing inet options to be reversed when passed to gen_tcp:connect/gen_udp:open. This broke the inet_backend option which must be the first option in the list according to gen_tcp and gen_udp documentation. Fix by reversing the Inet accumulator before returning. For dtls_socket, also append internal inet options to the user-provided ones instead of prepending them. Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
53bd589 to
c380a0d
Compare
|
@IngelaAndin Done. It's based on the |
The
emulated_options/3function intls_socketanddtls_socketused a prepend accumulator pattern without reversing the result, causing inet options to be reversed when passed togen_tcp:connect/gen_udp:open.This broke the
inet_backendoption which must be the first option in the list according togen_tcpandgen_udpdocumentation.Fix by reversing the Inet accumulator before returning.
Before
After