summaryrefslogtreecommitdiffhomepage
path: root/talpid-core/src
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2023-05-23 10:29:01 +0200
committerMarkus Pettersson <markus.pettersson@mullvad.net>2023-05-24 10:16:47 +0200
commitf405135121f4924afd92ce428193c8f72be68ef2 (patch)
treed2880df540166691b20e893cf55935a7514de3de /talpid-core/src
parentc486ba42cda039ca7e8f620fb2ea9a7b6c20b41b (diff)
downloadmullvadvpn-f405135121f4924afd92ce428193c8f72be68ef2.tar.xz
mullvadvpn-f405135121f4924afd92ce428193c8f72be68ef2.zip
Add tunnel interface to output of `mullvad status`
Print the name of the tunnel interface when the app is in a connected state and the user requests verbose output by running `mullvad status -v`. To accomplish this, the state machine needs attach more metadata about the tunnel state when transitioning to the `Connected` state than prior to this change.
Diffstat (limited to 'talpid-core/src')
-rw-r--r--talpid-core/src/tunnel_state_machine/connected_state.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/talpid-core/src/tunnel_state_machine/connected_state.rs b/talpid-core/src/tunnel_state_machine/connected_state.rs
index de9f43335e..2080416cad 100644
--- a/talpid-core/src/tunnel_state_machine/connected_state.rs
+++ b/talpid-core/src/tunnel_state_machine/connected_state.rs
@@ -323,7 +323,11 @@ impl TunnelState for ConnectedState {
bootstrap: Self::Bootstrap,
) -> (TunnelStateWrapper, TunnelStateTransition) {
let connected_state = ConnectedState::from(bootstrap);
- let tunnel_endpoint = connected_state.tunnel_parameters.get_tunnel_endpoint();
+ let tunnel_interface = Some(connected_state.metadata.interface.clone());
+ let tunnel_endpoint = talpid_types::net::TunnelEndpoint {
+ tunnel_interface,
+ ..connected_state.tunnel_parameters.get_tunnel_endpoint()
+ };
if let Err(error) = connected_state.set_firewall_policy(shared_values) {
DisconnectingState::enter(