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

Set/get broadcast address in TunInterface #138

Merged
merged 1 commit into from
Aug 26, 2023
Merged

Conversation

sampoder
Copy link
Member

@sampoder sampoder commented Jul 3, 2023

Modelled after TunInterface's IPV4 logic; uses SIOCGIFBRDADDR & SIOCSIFBRDADDR. View https://man7.org/linux/man-pages/man7/netdevice.7.html.

@sampoder sampoder marked this pull request as ready for review July 10, 2023 19:39
Copy link
Collaborator

@conradev conradev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wonderful!

@conradev conradev enabled auto-merge (rebase) August 9, 2023 04:17
@conradev conradev disabled auto-merge August 16, 2023 17:24
@conradev
Copy link
Collaborator

@sampoder the tests are failing

@malted
Copy link
Member

malted commented Aug 16, 2023

@sampoder the tests are failing

perhaps the interface needs to be brought up in the test after setting

@sampoder
Copy link
Member Author

Sorry about not checking up those tests, checking now! For MacOS & Windows, they're failing because this is currently only implemented on Linux. For Linux, well that's a whole separate question...

tun/src/unix/linux/mod.rs Outdated Show resolved Hide resolved
@sampoder
Copy link
Member Author

Fixed that error, but we've got a new one now:

Error: Os { code: 99, kind: AddrNotAvailable, message: "Cannot assign requested address" }

@conradev any idea what addresses are available for broadcast addresses? I was under the impression it worked the same as IPV4.

tun/tests/configure.rs Outdated Show resolved Hide resolved
Modelled after TunInterface's IPV4 logic.
Uses SIOCGIFBRDADDR & SIOCSIFBRDADDR.
View https://man7.org/linux/man-pages/man7/netdevice.7.html.
@conradev conradev enabled auto-merge (rebase) August 26, 2023 16:54
@conradev conradev merged commit c8df4b8 into main Aug 26, 2023
9 checks passed
@conradev conradev deleted the broadcast-addresses branch August 26, 2023 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants