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

Fix IP options (TTL and ToS) on IPv6 sockets #423

Merged
merged 2 commits into from
Jul 10, 2018

Conversation

jeandube
Copy link
Collaborator

@jeandube jeandube commented Jul 5, 2018

set IPv6_UNICAST_HOPS when setting SRTO_IPTTL on IPv6 socket
set IPV6_TCLASS when setting SRTO_TOS on IPv6 socket

set IPV6_TCLASS when setting SRTO_TOS on IPv6 socket
@ethouris
Copy link
Collaborator

ethouris commented Jul 6, 2018

This complicates things a bit (I have prepared a refactored version where m_iIPVersion field is removed and the only place where you specify the "family" is when you do bind() or connect()), but I think it should be able to be integrated. The values are written into the fields and are not in use until the UDP socket is created, and when it happens, the family is already decided. It would only have to return something sensible in case when the socket is not yet connected, but in this case I think it should do the same as it does now (because the UDP socket doesn't yet exist, or is not used by the SRT socket in question).

@jeandube
Copy link
Collaborator Author

jeandube commented Jul 6, 2018

And the goal of this refactoring is...? There is also the possibility to use the same approach as the socket API different options for IPv4 and IPv6 (the application discriminates the address family).

@ethouris
Copy link
Collaborator

ethouris commented Jul 6, 2018

Yes, but this is practically unnecessary. There's nothing dependent on the address family in SRT during the time when the socket is not bound and not connected. Just wanted to make sure that this change will be able to be transparent despite this refactoring - to all my knowledge, it should. At least the family can be extracted from m_BindAddr field.

@rndi rndi merged commit 9de61aa into Haivision:master Jul 10, 2018
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.

3 participants