Can pass kernel eBPF verify

This commit is contained in:
DaLaw2 2024-12-10 02:13:51 +08:00
parent 6097d6ea9c
commit 4e6a561321

View File

@ -24,11 +24,11 @@ pub fn ipv4_should_block(event: &IPv4Event) -> bool {
return true;
}
}
if let Some(ports) = IPV4_DST_BLACKLIST.get(&event.destination_ip) {
if is_port_blocked(ports, event.destination_port) {
return true;
}
}
// if let Some(ports) = IPV4_DST_BLACKLIST.get(&event.destination_ip) {
// if is_port_blocked(ports, event.destination_port) {
// return true;
// }
// }
}
false
}
@ -40,11 +40,11 @@ pub fn ipv6_should_block(event: &IPv6Event) -> bool {
return true;
}
}
if let Some(ports) = IPV6_DST_BLACKLIST.get(&event.destination_ip) {
if is_port_blocked(ports, event.destination_port) {
return true;
}
}
// if let Some(ports) = IPV6_DST_BLACKLIST.get(&event.destination_ip) {
// if is_port_blocked(ports, event.destination_port) {
// return true;
// }
// }
}
false
}