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

[MAINT/TEST] Clarified conditions for setting IPTOS/TTL options. Added UT for this. #3096

Merged
merged 6 commits into from
Dec 24, 2024

Conversation

ethouris
Copy link
Collaborator

Fixes #3095

Changes: maintained correctly and more clearly conditions for setting IP options on the UDP socket. Prevented the "ignored" case.

Added error logs that describe the problem, should one occur.

Added test that checks if setting these options.

@ethouris ethouris added Type: Maintenance Work required to maintain or clean up the code [core] Area: Changes in SRT library core [tests] Area: Unit tests labels Dec 20, 2024
@ethouris ethouris added this to the v1.5.5 milestone Dec 20, 2024
@ethouris
Copy link
Collaborator Author

ethouris commented Dec 20, 2024

Problem on Mac so far:

191: [T/S] Bind @566589933 to: ::ffff:127.0.0.1:5001 (IPv6)
191: 16:54:43.584199/*E:SRT.km: setsockopt(IP_TTL): Invalid argument (v6 mapped v4)
191: [T/S] ... result -1 (expected to succeed)

To be investiaged.

On Windows probably should be disabled, although investigation would be in order, too:

189: [T/S] Bind @246382028 to: ::1:5000 (IPv6)
189: 16:57:00.489000/T1676*E:SRT.km: setsockopt(IPV6_TCLASS): An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call.
189: 
189: [T/S] ... result -1 (expected to succeed)
189: D:\a\srt\srt\test\test_reuseaddr.cpp(267): error: Expected: (bind_res) != (SRT_ERROR), actual: -1 vs -1
189: [T/S] Bind @246382027 to: ::ffff:127.0.0.1:5001 (IPv6)
189: [T/S] ... result -1 (expected to succeed)
189: D:\a\srt\srt\test\test_reuseaddr.cpp(267): error: Expected: (bind_res) != (SRT_ERROR), actual: -1 vs -1

@ethouris ethouris marked this pull request as ready for review December 23, 2024 10:44
@maxsharabayko maxsharabayko merged commit 8a89a3a into Haivision:master Dec 24, 2024
12 checks passed
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 [tests] Area: Unit tests Type: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] srt_bind() fails for ipv6 addr any on MacOS and Windows when TOS is also set
2 participants