diff --git a/nflux-ebpf/src/egress.rs b/nflux-ebpf/src/egress.rs index 17de13b..bb183cd 100644 --- a/nflux-ebpf/src/egress.rs +++ b/nflux-ebpf/src/egress.rs @@ -6,11 +6,6 @@ use network_types::eth::{EthHdr, EtherType}; use network_types::ip::Ipv4Hdr; use nflux_common::EgressEvent; -#[map] -static ACTIVE_CONNECTIONS: LruHashMap = LruHashMap::with_max_entries(4096, 0); - -#[map] -static EGRESS_EVENT: PerfEventArray = PerfEventArray::new(0); pub fn try_tc_egress(ctx: TcContext) -> Result { let ethhdr: EthHdr = ctx.load(0).map_err(|_| ())?; diff --git a/nflux-ebpf/src/maps.rs b/nflux-ebpf/src/maps.rs index 156f428..dc17b7d 100644 --- a/nflux-ebpf/src/maps.rs +++ b/nflux-ebpf/src/maps.rs @@ -15,3 +15,9 @@ pub static CONNECTION_EVENTS: PerfEventArray = PerfEventArray:: #[map] pub static CONNECTION_TRACKER: LruHashMap = LruHashMap::with_max_entries(1024, 0); + +#[map] +static ACTIVE_CONNECTIONS: LruHashMap = LruHashMap::with_max_entries(4096, 0); + +#[map] +static EGRESS_EVENT: PerfEventArray = PerfEventArray::new(0); diff --git a/nflux/src/config.rs b/nflux/src/config.rs index e83601e..a040271 100644 --- a/nflux/src/config.rs +++ b/nflux/src/config.rs @@ -146,7 +146,7 @@ mod tests { let config = Nflux::load_config().unwrap(); // Assertions - assert_eq!(config.nflux.interface_names, vec!["eth0", "wlan0"]); + assert_eq!(config.nflux.interface_name, "wlan0"); assert_eq!(config.nflux.icmp_ping, IsEnabled::True); assert_eq!(config.logging.log_level, "debug"); assert_eq!(config.logging.log_type, "json");