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

tcp,udp: full IPv6 dual-stack socket support #911

Merged
merged 3 commits into from
Aug 18, 2023
Merged

tcp,udp: full IPv6 dual-stack socket support #911

merged 3 commits into from
Aug 18, 2023

Conversation

sreimers
Copy link
Member

@sreimers sreimers commented Aug 18, 2023

IPV6_V6ONLY=0 should already be the default on most systems. But it's needed on win32:

https://learn.microsoft.com/en-us/windows/win32/winsock/dual-stack-sockets#creating-a-dual-stack-socket

@sreimers sreimers changed the title tcp,udp: dual socket support tcp,udp: full ipv6 dual socket support Aug 18, 2023
@sreimers sreimers marked this pull request as ready for review August 18, 2023 08:06
@sreimers sreimers changed the title tcp,udp: full ipv6 dual socket support tcp,udp: full IPv6 dual socket support Aug 18, 2023
@sreimers sreimers changed the title tcp,udp: full IPv6 dual socket support tcp,udp: full IPv6 dual-stack socket support Aug 18, 2023
@sreimers sreimers added this to the v3.5.0 milestone Aug 18, 2023
@sreimers
Copy link
Member Author

sreimers commented Aug 18, 2023

Note: Some BSD systems set IPV6_V6ONLY=1 for security concerns.

From curl code:

/* It makes support for IPv4-mapped IPv6 addresses.
 * Linux kernel, NetBSD, FreeBSD and Darwin: default is off;
 * Windows Vista and later: default is on;
 * DragonFly BSD: acts like off, and dummy setting;
 * OpenBSD and earlier Windows: unsupported.
 * Linux: controlled by /proc/sys/net/ipv6/bindv6only.
 */

@sreimers
Copy link
Member Author

@landryb @jungle-boogie can you test this PR (especially udp based connections) on OpenBSD and your network setup?

@sreimers sreimers merged commit a3d05e4 into main Aug 18, 2023
@sreimers sreimers deleted the udp_fd6 branch August 18, 2023 14:35
@landryb
Copy link
Contributor

landryb commented Aug 28, 2023

sure i'll test it when i update our baresip stack this weekend - thanks for the headsup !

@landryb
Copy link
Contributor

landryb commented Sep 1, 2023

i've been able to test an udp over ipv4 call without issues, using baresip 3.4, re 3.4 and this PR backported on top locally (which builds fine on OpenBSD)

not sure i'll easily be able to test over ipv6 though, much more stuff to setup :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants