Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typespecs for netns and bind_to_device options #1816

Merged
merged 1 commit into from
May 24, 2018
Merged

Add typespecs for netns and bind_to_device options #1816

merged 1 commit into from
May 24, 2018

Conversation

cspiegel
Copy link
Contributor

Some networking functions accept the options netns (to switch network
namespaces) and bind_to_device (to bind to a device with
SO_BINDTODEVICE), but these functions are not annotated to accept these
options, which causes dialyzer to raise issues.

This patch applies these type specs to the options for
gen_tcp:connect/3,4, gen_tcp:listen/2, gen_udp:open/1,2, and
gen_sctp:open/0,1,2, as these are the documented functions which accept
the netns and bind_to_device options.

Some networking functions accept the options netns (to switch network
namespaces) and bind_to_device (to bind to a device with
SO_BINDTODEVICE), but these functions are not annotated to accept these
options, which causes dialyzer to raise issues.

This patch applies these type specs to the options for
gen_tcp:connect/3,4, gen_tcp:listen/2, gen_udp:open/1,2, and
gen_sctp:open/0,1,2, as these are the documented functions which accept
the netns and bind_to_device options.
@rickard-green rickard-green added the team:PS Assigned to OTP team PS label May 14, 2018
@RaimoNiskanen RaimoNiskanen added the testing currently being tested, tag is used by OTP internal CI label May 16, 2018
@RaimoNiskanen RaimoNiskanen merged commit 5c1d8ed into erlang:master May 24, 2018
@RaimoNiskanen
Copy link
Contributor

Merged to master. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants