Browse Source

netifd: packet_steering: fix shell error on unset steering_flows option

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 1 year ago
parent
commit
2d6fd937c3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      package/network/config/netifd/files/etc/init.d/packet_steering

+ 1 - 1
package/network/config/netifd/files/etc/init.d/packet_steering

@@ -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