From 74849228948c3e0de3405f258a5b2c8a8fd1fb21 Mon Sep 17 00:00:00 2001 From: huoji Date: Mon, 8 May 2023 00:15:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0SSH=E7=88=86=E7=A0=B4?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + linux_kernel/main.c | 2 ++ linux_kernel/network.c | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 211686a..d9ee186 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.cmake +linux_kernel/.main.o.d diff --git a/linux_kernel/main.c b/linux_kernel/main.c index e627626..a234bc0 100644 --- a/linux_kernel/main.c +++ b/linux_kernel/main.c @@ -110,8 +110,10 @@ int cleanup(void) { } destory_dev(); cleanup_msg(); + return -1; } + static int __init driver_entry(void) { printk(KERN_WARNING "[DebugMessage] safe duck init\n"); diff --git a/linux_kernel/network.c b/linux_kernel/network.c index 23f6480..3cd2c60 100644 --- a/linux_kernel/network.c +++ b/linux_kernel/network.c @@ -20,7 +20,6 @@ void block_ip_address(size_t ip_address, size_t time_sec) { bool check_is_blacklist_ip(size_t ip_address) { struct ip_hashmap_node_t *data = get_ipdata_by_hashmap(ip_address); if (data == NULL) { - printk(KERN_ERR "Failed to get ip data from hashmap\n"); return false; } return data->info.ip_meta_info.is_attack;