增加解除IP封禁的选项

This commit is contained in:
huoji
2023-11-17 04:19:50 +08:00
parent 6bac06d28a
commit 4f50eee45a
7 changed files with 57 additions and 4 deletions

View File

@@ -24,6 +24,13 @@ bool check_is_blacklist_ip(u32 ip_address) {
}
return data->info.ip_meta_info.is_attack;
}
void unblock_ip_address(u32 ip_address) {
struct ip_hashmap_node_t *data = get_ipdata_by_hashmap(ip_address);
if (data == NULL) {
return;
}
data->info.ip_meta_info.is_attack = false;
}
bool check_syn_attack(struct iphdr *ip_header, struct sk_buff *skb) {
bool is_block = false;
do {