From 5240c9339cc894f9d40234967ea30acaddfc62d5 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Jan 2026 01:31:21 +0800 Subject: udpated_aya_version --- Cargo.lock | 38 ++++++++++++++++++++------------------ Cargo.toml | 4 ++-- packet-detector/src/.main.rs.swp | Bin 16384 -> 16384 bytes packet-detector/src/main.rs | 4 ++-- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index be5fb54..60933ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -210,18 +210,18 @@ dependencies = [ [[package]] name = "aya" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90eea657cc8028447cbda5068f4e10c4fadba0131624f4f7dd1a9c46ffc8d81f" +checksum = "d18bc4e506fbb85ab7392ed993a7db4d1a452c71b75a246af4a80ab8c9d2dd50" dependencies = [ "assert_matches", "aya-obj", "bitflags", "bytes", - "lazy_static", "libc", "log", "object", + "once_cell", "thiserror 1.0.69", ] @@ -266,13 +266,13 @@ dependencies = [ [[package]] name = "aya-obj" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c02024a307161cf3d1f052161958fd13b1a33e3e038083e58082c0700fdab85" +checksum = "c51b96c5a8ed8705b40d655273bc4212cbbf38d4e3be2788f36306f154523ec7" dependencies = [ "bytes", "core-error", - "hashbrown 0.14.5", + "hashbrown 0.15.5", "log", "object", "thiserror 1.0.69", @@ -412,6 +412,15 @@ dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + [[package]] name = "crossbeam-utils" version = "0.8.21" @@ -807,16 +816,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -1388,10 +1387,13 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ + "crc32fast", + "hashbrown 0.15.5", + "indexmap", "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 17750ae..cf5a1d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,8 @@ members = ["packet-detector", "packet-detector-ebpf", "xtask"] resolver = "2" [workspace.dependencies] -aya = "0.12" -aya-ebpf = "0.1" +aya = "0.13.1" +aya-ebpf = "0.1.1" [profile.dev] opt-level = 3 diff --git a/packet-detector/src/.main.rs.swp b/packet-detector/src/.main.rs.swp index 6037596..4a73a5f 100644 Binary files a/packet-detector/src/.main.rs.swp and b/packet-detector/src/.main.rs.swp differ diff --git a/packet-detector/src/main.rs b/packet-detector/src/main.rs index 69cccec..fd79e8b 100644 --- a/packet-detector/src/main.rs +++ b/packet-detector/src/main.rs @@ -7,7 +7,7 @@ use std::net::Ipv4Addr; use anyhow::{Context, Result}; use aya::maps::{HashMap as AyaHashMap, RingBuf}; use aya::programs::{Xdp, XdpFlags}; -use aya::{include_bytes_aligned, Bpf}; +use aya::{include_bytes_aligned, Ebpf}; use log::{info, warn}; use tls_parser::{parse_tls_plaintext, TlsMessage, TlsMessageHandshake}; use tokio::signal; @@ -111,7 +111,7 @@ async fn main() -> Result<()> { let validator = args.get(2).map(|p| CertValidator::with_ca_file(p)).transpose()?; info!("Mode: {}", if validator.is_some() { "TLS cert validation" } else { "UDP magic detection" }); - let mut bpf = Bpf::load(include_bytes_aligned!("../../target/bpfel-unknown-none/release/packet-detector"))?; + let mut bpf = Ebpf::load(include_bytes_aligned!("../../target/bpfel-unknown-none/release/packet-detector"))?; let program: &mut Xdp = bpf.program_mut("packet_detector").unwrap().try_into()?; program.load()?; program.attach(iface, XdpFlags::default()).context("XDP attach failed")?; -- cgit