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

[BUG] Fixed PKTINFO case that was failing for IPv4+IPv6 bound sockets #2630

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

ethouris
Copy link
Collaborator

The problem detected while fixing #2608 and handling of the dual-IP address binding cases.

The problem:

The CMSG should be provided only per requested information, however in case of dual-bound sockets (IPv4 + IPv6), which would be used in case when the listener has bound to "::" with IPV6_V6ONLY option 0 (which means binding to both IPv4 and IPv6 wildcards) will effectively have set both IPPROTO_IP/IP_PKTINFO and IPPROTO_IPV6/IPV6_RECVPKTINFO flags set and in consequence both IPv4 and IPv6 pktinfo message will be provided with recvmsg call. The problem was that the space reserved for filling in this message was set as the one for only IPv4 or IPv6. The fix reserved enough space to fill BOTH IPv4 and IPv6 pktinfo cmsg at once.

Besides, there is added also an enhanced diagnostics where the problem has been detected: the flags set back on the returned data are parsed. This happens only for POSIX systems because Windows uses WSARecvFrom, which doesn't report these flags.

@ethouris ethouris added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Jan 25, 2023
@ethouris ethouris added this to the v1.5.2 milestone Jan 25, 2023
@ethouris
Copy link
Collaborator Author

AppVeyor only failed to upload the artifacts in one of the builds.

@maxsharabayko maxsharabayko merged commit b8962b4 into Haivision:master Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants