Compare commits

..

2 Commits

Author SHA1 Message Date
HouQiming
8333ec290c
Merge 864e8090ba1b473479966a1419630109ffd64210 into d1a9bcc4fb5a7c4f65e96de0f0561af507f627b2 2023-10-08 13:11:05 +03:00
yancey
d1a9bcc4fb try to fix linux 6.5 compile 2023-10-07 08:26:10 -04:00
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 int ret = setsockopt(raw_recv_fd, SOL_SOCKET, SO_DETACH_FILTER, &dummy, sizeof(dummy)); // in case i forgot to remove
if (ret != 0) { if (ret != 0) {
@ -841,7 +841,7 @@ void init_filter(int port) {
void remove_filter() { void remove_filter() {
filter_port = 0; filter_port = 0;
#ifdef UDP2RAW_LINUX #ifdef UDP2RAW_LINUX
int dummy; int dummy=0;
int ret = setsockopt(raw_recv_fd, SOL_SOCKET, SO_DETACH_FILTER, &dummy, sizeof(dummy)); int ret = setsockopt(raw_recv_fd, SOL_SOCKET, SO_DETACH_FILTER, &dummy, sizeof(dummy));
if (ret != 0) { if (ret != 0) {
mylog(log_debug, "error remove fiter\n"); mylog(log_debug, "error remove fiter\n");

View File

@ -228,12 +228,12 @@ struct packet_info_t // todo change this to union
bool has_ts; bool has_ts;
i32_t data_len;
#ifdef UDP2RAW_LINUX #ifdef UDP2RAW_LINUX
sockaddr_ll addr_ll; sockaddr_ll addr_ll;
#endif #endif
i32_t data_len;
packet_info_t(); packet_info_t();
}; };