Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
containerscrew committed Dec 26, 2024
1 parent 73ee8f1 commit 2c0c18e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nflux-ebpf/src/egress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn ptr_at<T>(ctx: &TcContext, offset: usize) -> Result<*const T, ()> {

pub fn try_tc_egress(ctx: TcContext) -> Result<i32, ()> {
let ethhdr: EthHdr = ctx.load(0).map_err(|_| ())?;

match ethhdr.ether_type {
EtherType::Ipv4 => unsafe {
info!(&ctx, "is an ipv4 packet!");
Expand All @@ -39,7 +39,7 @@ pub fn try_tc_egress(ctx: TcContext) -> Result<i32, ()> {
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
Expand Down
2 changes: 1 addition & 1 deletion nflux.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface_name = "wlp2s0"
icmp_ping = "true"

[egress]
enabled = "true"
enabled = "true"
interface_name = "proton0"


Expand Down

0 comments on commit 2c0c18e

Please sign in to comment.