From db4888cd0c779dc3aea9ce2c97c69cf592ba531e Mon Sep 17 00:00:00 2001 From: SunBK201 Date: Tue, 11 Nov 2025 17:42:02 +0800 Subject: [PATCH] fix: ensure nft backend is only set when available in detect_backend --- openwrt/files/ua3f.init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openwrt/files/ua3f.init b/openwrt/files/ua3f.init index 69dfe0e..895afcb 100755 --- a/openwrt/files/ua3f.init +++ b/openwrt/files/ua3f.init @@ -136,16 +136,20 @@ detect_backend() { if opkg_available; then if [ "$SERVER_MODE" = "TPROXY" ]; then if opkg list-installed kmod-nft-tproxy | grep -q 'kmod-nft-tproxy'; then + if nft_available; then FW_BACKEND="nft" return 0 + fi else FW_BACKEND="ipt" return 0 fi elif [ "$SERVER_MODE" = "NFQUEUE" ]; then if opkg list-installed kmod-nft-queue | grep -q 'kmod-nft-queue'; then + if nft_available; then FW_BACKEND="nft" return 0 + fi else FW_BACKEND="ipt" return 0