try to fix linux 6.5 compile

This commit is contained in:
yancey 2023-10-07 08:26:10 -04:00
parent bc8bd8c2f8
commit d1a9bcc4fb
2 changed files with 4 additions and 4 deletions

View File

@ -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");

View File

@ -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();
};