From d1a9bcc4fb5a7c4f65e96de0f0561af507f627b2 Mon Sep 17 00:00:00 2001 From: yancey Date: Sat, 7 Oct 2023 08:26:10 -0400 Subject: [PATCH] try to fix linux 6.5 compile --- network.cpp | 4 ++-- network.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/network.cpp b/network.cpp index adb8d9b..bd01964 100644 --- a/network.cpp +++ b/network.cpp @@ -702,7 +702,7 @@ void init_filter(int port) { } } - int dummy; + int dummy=0; int ret = setsockopt(raw_recv_fd, SOL_SOCKET, SO_DETACH_FILTER, &dummy, sizeof(dummy)); // in case i forgot to remove if (ret != 0) { @@ -841,7 +841,7 @@ void init_filter(int port) { void remove_filter() { filter_port = 0; #ifdef UDP2RAW_LINUX - int dummy; + int dummy=0; int ret = setsockopt(raw_recv_fd, SOL_SOCKET, SO_DETACH_FILTER, &dummy, sizeof(dummy)); if (ret != 0) { mylog(log_debug, "error remove fiter\n"); diff --git a/network.h b/network.h index dbeb0bf..a5d58a8 100644 --- a/network.h +++ b/network.h @@ -226,12 +226,12 @@ struct packet_info_t // todo change this to union bool has_ts; + i32_t data_len; + #ifdef UDP2RAW_LINUX sockaddr_ll addr_ll; #endif - i32_t data_len; - packet_info_t(); };