netifd: packet_steering: fix shell error on unset steering_flows option
authorFelix Fietkau <nbd@nbd.name>
Sat, 27 Apr 2024 18:59:43 +0000 (20:59 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sat, 27 Apr 2024 18:59:52 +0000 (20:59 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/config/netifd/files/etc/init.d/packet_steering

index 19d423797a936446228b759999c161ca69ca8195..5266a931aee6e3a42b31a5e94465e498bcbadd5d 100755 (executable)
@@ -16,7 +16,7 @@ service_triggers() {
 reload_service() {
        packet_steering="$(uci -q get "network.@globals[0].packet_steering")"
        steering_flows="$(uci -q get "network.@globals[0].steering_flows")"
-       [ "$steering_flows" -gt 0 ] && opts="-l $steering_flows"
+       [ "${steering_flows:-0}" -gt 0 ] && opts="-l $steering_flows"
        if [ -e "/usr/libexec/platform/packet-steering.sh" ]; then
                /usr/libexec/platform/packet-steering.sh "$packet_steering"
        else