Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
containerscrew committed Dec 4, 2024
1 parent e26f4bd commit 1129112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions nflux.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ log_type = "text" # text or json. Defaults to text if not set
# # Rules for MAC address filtering
# "00:0a:95:9d:68:16" = { action = "allow" }
# "00:0a:95:9d:68:17" = { action = "deny" }


6 changes: 2 additions & 4 deletions nflux/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ mod core;
mod logger;
mod utils;


use anyhow::Context;
use aya::maps::lpm_trie::Key;
use aya::maps::perf::{AsyncPerfEventArrayBuffer, PerfBufferError};
Expand All @@ -13,15 +12,15 @@ use aya::util::online_cpus;
use aya::{include_bytes_aligned, Ebpf};
use bytes::BytesMut;
use config::{Action, Nflux, Protocol, Rules};
use core::set_mem_limit;
use logger::setup_logger;
use nflux_common::{convert_protocol, ConnectionEvent, IpRule, LpmKeyIpv4};
use utils::{is_root_user, wait_for_shutdown};
use core::set_mem_limit;
use std::collections::HashMap;
use std::net::Ipv4Addr;
use std::ptr;
use tokio::task;
use tracing::{error, info};
use utils::{is_root_user, wait_for_shutdown};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
Expand Down Expand Up @@ -172,7 +171,6 @@ fn prepare_ip_rule(rule: &Rules) -> anyhow::Result<IpRule> {
})
}


// fn populate_ipv6_rules(bpf: &mut Ebpf, ip_rules: &HashMap<String, Rules>) -> anyhow::Result<()> {
// let mut ipv6_map: LpmTrie<&mut MapData, LpmKeyIpv6, IpRule> = LpmTrie::try_from(
// bpf.map_mut("IPV6_RULES").context("Failed to find IPV4_RULES map")?,
Expand Down

0 comments on commit 1129112

Please sign in to comment.