diff --git a/luci-app-omr-dscp/root/etc/init.d/omr-dscp b/luci-app-omr-dscp/root/etc/init.d/omr-dscp index 63dd5e19b..bed7c3bad 100755 --- a/luci-app-omr-dscp/root/etc/init.d/omr-dscp +++ b/luci-app-omr-dscp/root/etc/init.d/omr-dscp @@ -11,6 +11,14 @@ USE_PROCD=1 # shellcheck disable=SC1091 . /lib/functions.sh +if [ -f /usr/sbin/iptables-legacy ]; then + IPTABLES="/usr/sbin/iptables-legacy" + IP6TABLES="/usr/sbin/ip6tables-legacy" +else + IPTABLES="/usr/sbin/iptables" + IP6TABLES="/usr/sbin/ip6tables" +fi + # Get the lan interface name lan_device= config_load network @@ -19,10 +27,10 @@ config_get lan_device lan ifname config_load dscp _ipt4() { - iptables -w -t mangle "$@" 2>&1 >/dev/null + $IPTABLES -w -t mangle "$@" 2>&1 >/dev/null } _ipt6() { - ip6tables -w -t mangle "$@" 2>&1 >/dev/null + $IP6TABLES -w -t mangle "$@" 2>&1 >/dev/null } _add_dscp_rule() {