Skip to content

IPv6 use interface when sending to link-local dest #448

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

Merged
merged 1 commit into from Jul 23, 2021
Merged

IPv6 use interface when sending to link-local dest #448

merged 1 commit into from Jul 23, 2021

Conversation

fluke-pvan
Copy link
Contributor

@fluke-pvan fluke-pvan commented Jul 22, 2021

Attempting to send a Tins::IPv6 PDU with a link-scope destination address will result in a "Network is unreachable" error (error code 101).
From the RFC2553 document section 3.3, it states

The sin6_scope_id field is a 32-bit integer that identifies a set of interfaces
as appropriate for the scope of the address carried in the sin6_addr field.
For a link scope sin6_addr, sin6_scope_id would be an interface index.

It understand this might be argued against since we're allowing a non-link layer PDU to be sent through a specified interface, but overall I think this should be up to the user to decide if a packet should be sent through a specified interface or allow the kernel to do so. Maybe that will be another pull request.

@mfontanini
Copy link
Owner

I think this is a reasonable change. If an interface index is required then we should be setting it.

Thanks!

@mfontanini mfontanini merged commit 24ac038 into mfontanini:master Jul 23, 2021
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