From ea08ba6ee802a0a6f3152742b0bd9e275c92ec40 Mon Sep 17 00:00:00 2001 From: Anonymous <> Date: Sun, 5 May 2024 14:28:51 +0900 Subject: [PATCH] update: init thw whole packet_t instead of in6_addr --- bpf/flat.c | 4 ---- bpf/flat_portable.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/bpf/flat.c b/bpf/flat.c index 7cde1eb..2e42551 100755 --- a/bpf/flat.c +++ b/bpf/flat.c @@ -55,10 +55,6 @@ static inline int handle_ip_packet(void* head, void* tail, uint32_t* offset, str return TC_ACT_OK; } - // Clean the structure before using it - pkt->src_ip = (struct in6_addr){0}; - pkt->dst_ip = (struct in6_addr){0}; - // Create IPv4-Mapped IPv6 Address pkt->src_ip.in6_u.u6_addr32[3] = ip->saddr; pkt->dst_ip.in6_u.u6_addr32[3] = ip->daddr; diff --git a/bpf/flat_portable.c b/bpf/flat_portable.c index 9e7c965..1a27a01 100755 --- a/bpf/flat_portable.c +++ b/bpf/flat_portable.c @@ -50,10 +50,6 @@ static inline int handle_ip_packet(void* head, void* tail, uint32_t* offset, str return TC_ACT_OK; } - // Clean the structure before using it - pkt->src_ip = (struct in6_addr){0}; - pkt->dst_ip = (struct in6_addr){0}; - // Create IPv4-Mapped IPv6 Address pkt->src_ip.in6_u.u6_addr32[3] = ip->saddr; pkt->dst_ip.in6_u.u6_addr32[3] = ip->daddr;