diff --git a/files/natflow.init b/files/natflow.init index 1be3498..34d746b 100644 --- a/files/natflow.init +++ b/files/natflow.init @@ -4,14 +4,14 @@ START=95 disable_gro_gso() { - for eth in $(ifconfig | grep "^eth\|^dsa|^lan|^wan" | awk '{print $1}' | sort | uniq); do + for eth in $(ifconfig | grep "^eth\|^dsa\|^lan\|^wan" | awk '{print $1}' | sort | uniq); do ethtool -k "$eth" | grep -q "generic-receive-offload: off" || ethtool -K "$eth" gro off ethtool -k "$eth" | grep -q "generic-segmentation-offload: off" || ethtool -K "$eth" gso off done } enable_gro_gso() { - for eth in $(ifconfig | grep "^eth\|^dsa|^lan|^wan" | awk '{print $1}' | sort | uniq); do + for eth in $(ifconfig | grep "^eth\|^dsa\|^lan\|^wan" | awk '{print $1}' | sort | uniq); do [[ "$(uname -m)" != arm* ]] && ethtool -k "$eth" | grep -q "generic-receive-offload: on" || ethtool -K "$eth" gro on ethtool -k "$eth" | grep -q "generic-segmentation-offload: on" || ethtool -K "$eth" gso on done @@ -22,8 +22,11 @@ start() { [ "$(uci -q get firewall.@defaults[0].natflow)" != 1 ] && return 0 disable_gro_gso delay_pkts=$(uci -q get firewall.@defaults[0].natflow_delay_pkts || echo 0) - echo disabled=0 >/dev/natflow_ctl + + echo "debug=0" >/dev/natflow_ctl + echo "disabled=0" >/dev/natflow_ctl echo "delay_pkts=$delay_pkts" >/dev/natflow_ctl + echo "skip_qos_to_slow_path=0" >/dev/natflow_ctl echo ifname_clear >/dev/natflow_ctl logger -t natflow "natflow has been enabled" }