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

windows/tun: change wintun dependency to iwanbk/wintun #485

Closed
wants to merge 1 commit into from

Conversation

iwanbk
Copy link
Member

@iwanbk iwanbk commented Oct 23, 2024

Because the original wintun crate doesn't set the MTU correctly

Fixes #474

Because the original wintun crate doesn't set the MTU correctly
@iwanbk iwanbk marked this pull request as ready for review October 25, 2024 08:57
@iwanbk
Copy link
Member Author

iwanbk commented Oct 25, 2024

@LeeSmet
i pointed out the dependency to my branch because i consider it as temporary, the end goal would be one of these:

  1. put the code in threefoldtech/wintun master branch
  2. contribute the code to the upstream

My plan is going to number two first, number one is the backup

@iwanbk
Copy link
Member Author

iwanbk commented Oct 25, 2024

will create github issue based on our agreement

@LeeSmet
Copy link
Contributor

LeeSmet commented Oct 25, 2024

The current fix works for us but would break users of wintun who rely on ipv4, so a commit upstream would need some more refinement. For now, I think the best way forward is to copy the fixed function over to the windows tun module here in mcyelium. We already have some other code which basically does the same after all

@iwanbk
Copy link
Member Author

iwanbk commented Oct 25, 2024

The current fix works for us but would break users of wintun who rely on ipv4, so a commit upstream would need some more refinement

yes, of course.

For now, I think the best way forward is to copy the fixed function over to the windows tun module here in mcyelium

you meant copying this code (and maybe other deps or modify it)
https://github.com/iwanbk/wintun/blob/f2e5353c54cc6a8486b55112dc0de6e016491a8a/src/util.rs#L383-L413

Looks like that is also possible

We already have some other code which basically does the same after all

Can you elaborate more about this?

@LeeSmet
Copy link
Contributor

LeeSmet commented Oct 25, 2024

We currently already rely on netsh being available for windows as it is used to set the ipv6 address: https://github.com/threefoldtech/mycelium/blob/master/mycelium/src/tun/windows.rs#L119, so just copying the function and putting it here should be fine (i.e. running the netsh command to set the ipv6 mtu)

@iwanbk
Copy link
Member Author

iwanbk commented Oct 25, 2024

okay, looks better

@iwanbk
Copy link
Member Author

iwanbk commented Oct 25, 2024

OK, i close it in favor of #487

@iwanbk iwanbk closed this Oct 25, 2024
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.

Could not connect to machines created from the dashboard using mycelium on windows
2 participants