From 8d0bb33e042e6f775e0af32045d6a2b02f5e2c76 Mon Sep 17 00:00:00 2001 From: Ren Zongjia Date: Sun, 24 Apr 2022 22:03:19 +0800 Subject: [PATCH] Add the device attribute of getting interface Signed-off-by: Ren Zongjia --- luci-app-ssr-plus/root/usr/bin/ssr-rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/luci-app-ssr-plus/root/usr/bin/ssr-rules b/luci-app-ssr-plus/root/usr/bin/ssr-rules index 06aa942b5..4a85173fa 100755 --- a/luci-app-ssr-plus/root/usr/bin/ssr-rules +++ b/luci-app-ssr-plus/root/usr/bin/ssr-rules @@ -191,6 +191,7 @@ ac_rule() { else for name in $Interface; do local IFNAME=$(uci -P /var/state get network.$name.ifname 2>/dev/null) + [ -z "$IFNAME" ] && IFNAME=$(uci -P /var/state get network.$name.device 2>/dev/null) [ -n "$IFNAME" ] && $IPT -I PREROUTING 1 ${IFNAME:+-i $IFNAME} -p tcp $EXT_ARGS $MATCH_SET -m comment --comment "$TAG" -j SS_SPEC_WAN_AC done fi @@ -262,6 +263,7 @@ tp_rule() { else for name in $Interface; do local IFNAME=$(uci -P /var/state get network.$name.ifname 2>/dev/null) + [ -z "$IFNAME" ] && IFNAME=$(uci -P /var/state get network.$name.device 2>/dev/null) [ -n "$IFNAME" ] && $ipt -I PREROUTING 1 ${IFNAME:+-i $IFNAME} -p udp $EXT_ARGS $MATCH_SET -m comment --comment "$TAG" -j SS_SPEC_TPROXY done fi