[kernel][dist_util] Support 4-arity #hs_data.f_handshake_complete in dist_util.erl #8473
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently,
#hs_data.f_handshake_complete
supports a 3-arity function with the following function signature:This PR extends the callback to also handle a 4-arity function:
Why? Once the handshake completes, there's currently no way to find out what the final
ChosenFlags
are betweenthis_node
andother_node
; or what the value ofother_creation
was.The
HSData
variable is effectively discarded entirely whencon_loop
is called, so this information is lost for those wanting to implement an alternative dist protocol.See here for an example of how this information is used in WhatsApp/erldist_filter: https://github.com/WhatsApp/erldist_filter/blob/main/apps/erldist_filter/src/erldist_filter_otp_26_0_2_inet_tcp_dist.erl#L931-L937