This commit is contained in:
BIN
Binary file not shown.
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user