From 2c0c18e4c59503cb7280a40e0bb5b62eb970d088 Mon Sep 17 00:00:00 2001 From: containerscrew Date: Thu, 26 Dec 2024 17:39:06 +0100 Subject: [PATCH] fmt --- nflux-ebpf/src/egress.rs | 4 ++-- nflux.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nflux-ebpf/src/egress.rs b/nflux-ebpf/src/egress.rs index 6b32819..9484c6d 100644 --- a/nflux-ebpf/src/egress.rs +++ b/nflux-ebpf/src/egress.rs @@ -28,7 +28,7 @@ fn ptr_at(ctx: &TcContext, offset: usize) -> Result<*const T, ()> { pub fn try_tc_egress(ctx: TcContext) -> Result { let ethhdr: EthHdr = ctx.load(0).map_err(|_| ())?; - + match ethhdr.ether_type { EtherType::Ipv4 => unsafe { info!(&ctx, "is an ipv4 packet!"); @@ -39,7 +39,7 @@ pub fn try_tc_egress(ctx: TcContext) -> Result { IpProto::Tcp => { let tcphdr: *const TcpHdr = ptr_at(&ctx, EthHdr::LEN + Ipv4Hdr::LEN)?; let dst_port = u16::from_be((*tcphdr).dest); - + // Check if this destination is already active if ACTIVE_CONNECTIONS.get(&destination).is_none() { // Log only new connections diff --git a/nflux.toml b/nflux.toml index 6262d70..21e6d2f 100644 --- a/nflux.toml +++ b/nflux.toml @@ -4,7 +4,7 @@ interface_name = "wlp2s0" icmp_ping = "true" [egress] -enabled = "true" +enabled = "true" interface_name = "proton0"