-
Notifications
You must be signed in to change notification settings - Fork 349
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
Remove split tunnel interface if split tunneling is disabled #6666
Remove split tunnel interface if split tunneling is disabled #6666
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @MarkusPettersson98)
talpid-core/src/split_tunnel/macos/mod.rs
line 435 at r1 (raw file):
vpn_interface, } if paths.is_empty() => { drop(tun_handle);
We should shut these down gracefully rather than just drop them. See Self::shutdown()
. That could probably be called here.
talpid-core/src/split_tunnel/macos/mod.rs
line 512 at r1 (raw file):
match tun_handle .set_interfaces(default_interface, Some(vpn_interface.clone()))
vpn_interface
is shadowed by the old/existing value here.
6912bd6
to
8b5a877
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @dlon)
talpid-core/src/split_tunnel/macos/mod.rs
line 435 at r1 (raw file):
Previously, dlon (David Lönnhager) wrote…
We should shut these down gracefully rather than just drop them. See
Self::shutdown()
. That could probably be called here.
Done
talpid-core/src/split_tunnel/macos/mod.rs
line 512 at r1 (raw file):
Previously, dlon (David Lönnhager) wrote…
vpn_interface
is shadowed by the old/existing value here.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)
talpid-core/src/split_tunnel/macos/mod.rs
line 505 at r2 (raw file):
process, tun_handle, vpn_interface,
Previously, the state wasn't altered when failing, but now it seems to receive the new VPN interface. It could probably become out of sync with tun
, so might be best to keep the old behavior.
8b5a877
to
998ca2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @dlon)
talpid-core/src/split_tunnel/macos/mod.rs
line 505 at r2 (raw file):
Previously, dlon (David Lönnhager) wrote…
Previously, the state wasn't altered when failing, but now it seems to receive the new VPN interface. It could probably become out of sync with
tun
, so might be best to keep the old behavior.
Ah yes, that's a fair point. Reverted that change, so now the old VPN interface is kept upon failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
279c7d4
to
166e257
Compare
166e257
to
6b97a6f
Compare
In the current split tunnel design, the split tunnel interface is never destroyed once it has been created. This PR removes the split tunnel interface when split tunneling is disabled, since any potential issues with split tunneling should not affect anyone who disables the feature.
This change is