diff --git a/blockip/bip b/blockip/bip index 8444be5..a52f2cc 100644 Binary files a/blockip/bip and b/blockip/bip differ diff --git a/blockip/include/common.h b/blockip/include/common.h index 3b6eaba..5a70b2b 100644 --- a/blockip/include/common.h +++ b/blockip/include/common.h @@ -25,7 +25,7 @@ #define PERSIST_FILE CONFIG_DIR "/blacklist" #define WHITELIST_FILE CONFIG_DIR "/whitelist" #define INSTALL_PATH "/usr/local/bin/bip" -#define NFT_TABLE "inet filter" +#define NFT_TABLE "inet bip" #define NFT_SET "blacklist" #define NFT_SET_V6 "blacklist_v6" #define NFT_WHITELIST "whitelist" diff --git a/blockip/src/install.c b/blockip/src/install.c index e09d14c..ce465d7 100644 --- a/blockip/src/install.c +++ b/blockip/src/install.c @@ -166,8 +166,8 @@ int install_service(void) { /* 清空bip相关nft表和集合,防止历史残留 */ char nft_clear_cmd[MAX_COMMAND_LEN]; snprintf(nft_clear_cmd, sizeof(nft_clear_cmd), - "nft flush table '%s'; " - "nft delete table '%s' 2>/dev/null;", + "nft flush table %s 2>/dev/null; " + "nft delete table %s 2>/dev/null;", NFT_TABLE, NFT_TABLE); system(nft_clear_cmd);