Skip to content

Commit

Permalink
Revert "Use fwmark value instead of 0 (#812)" (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
octol authored Aug 2, 2024
1 parent 716f495 commit 66d7b88
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 0 additions & 2 deletions nym-vpn-core/nym-vpn-lib/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ use talpid_types::net::GenericTunnelOptions;

#[cfg(target_os = "linux")]
pub const TUNNEL_FWMARK: u32 = 0x6d6f6c65;
#[cfg(target_os = "linux")]
pub const TUNNEL_TABLE_ID: u32 = 0x6d6f6c65;

#[derive(Clone)]
pub struct WireguardConfig(pub talpid_wireguard::config::Config);
Expand Down
9 changes: 3 additions & 6 deletions nym-vpn-core/nym-vpn-lib/src/tunnel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,9 @@ pub fn start_tunnel(
pub async fn setup_route_manager() -> crate::error::Result<RouteManager> {
#[cfg(target_os = "linux")]
let route_manager = {
RouteManager::new(
HashSet::new(),
crate::config::TUNNEL_FWMARK,
crate::config::TUNNEL_TABLE_ID,
)
.await?
let fwmark = 0;
let table_id = 0;
RouteManager::new(HashSet::new(), fwmark, table_id).await?
};

#[cfg(not(target_os = "linux"))]
Expand Down
4 changes: 2 additions & 2 deletions nym-vpn-core/nym-vpn-lib/src/tunnel_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ pub(crate) async fn init_firewall_dns(

#[cfg(target_os = "linux")]
{
let fwmark = 0; // ?
debug!("Starting firewall");
let firewall = tokio::task::spawn_blocking(move || {
Firewall::new(crate::config::TUNNEL_FWMARK)
.map_err(|err| crate::error::Error::FirewallError(err.to_string()))
Firewall::new(fwmark).map_err(|err| crate::error::Error::FirewallError(err.to_string()))
})
.await??;
debug!("Starting dns monitor");
Expand Down

0 comments on commit 66d7b88

Please sign in to comment.