From 2159f71888c615f08f98ebd36eb433d507bb976d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan-=C8=98tefan=20Neac=C5=9Fu?= Date: Wed, 3 Jul 2024 09:04:01 +0000 Subject: [PATCH] Fix wg feature --- gateway/Cargo.toml | 4 ++-- gateway/src/node/mod.rs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gateway/Cargo.toml b/gateway/Cargo.toml index 5bac7ec6d2..cc2c6c37d1 100644 --- a/gateway/Cargo.toml +++ b/gateway/Cargo.toml @@ -58,6 +58,7 @@ zeroize = { workspace = true } # internal +nym-authenticator = { path = "../service-providers/authenticator" } nym-api-requests = { path = "../nym-api/nym-api-requests" } nym-bin-common = { path = "../common/bin-common", features = ["output_format"] } nym-config = { path = "../common/config" } @@ -77,7 +78,6 @@ nym-types = { path = "../common/types" } nym-validator-client = { path = "../common/client-libs/validator-client" } nym-ip-packet-router = { path = "../service-providers/ip-packet-router" } -nym-authenticator = { path = "../service-providers/authenticator", optional = true } nym-wireguard = { path = "../common/wireguard", optional = true } nym-wireguard-types = { path = "../common/wireguard-types", default-features = false } @@ -94,7 +94,7 @@ sqlx = { workspace = true, features = [ ] } [features] -wireguard = ["nym-authenticator", "nym-wireguard", "defguard_wireguard_rs"] +wireguard = ["nym-wireguard", "defguard_wireguard_rs"] [package.metadata.deb] name = "nym-gateway" diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index 58ba3f699a..2236cc40c5 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -123,6 +123,8 @@ pub struct Gateway { ip_packet_router_opts: Option, + // Use None when wireguard feature is not enabled too + #[allow(dead_code)] authenticator_opts: Option, /// ed25519 keypair used to assert one's identity. @@ -561,6 +563,7 @@ impl Gateway { info!("embedded ip packet router is disabled"); }; + #[cfg(feature = "wireguard")] let _wg_api = if let Some(opts) = self.authenticator_opts.clone() { Some( self.start_authenticator(&opts, shutdown.fork("wireguard"))