[openwrt/openwrt] netifd: packet_steering: fix shell error on unset steering_flows option

LEDE Commits lede-commits at lists.infradead.org
Sat Apr 27 11:59:55 PDT 2024


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2d6fd937c36bf3d8991b0fd9f6d845fab18af790

commit 2d6fd937c36bf3d8991b0fd9f6d845fab18af790
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Apr 27 20:59:43 2024 +0200

    netifd: packet_steering: fix shell error on unset steering_flows option
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/files/etc/init.d/packet_steering | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/netifd/files/etc/init.d/packet_steering b/package/network/config/netifd/files/etc/init.d/packet_steering
index 19d423797a..5266a931ae 100755
--- a/package/network/config/netifd/files/etc/init.d/packet_steering
+++ b/package/network/config/netifd/files/etc/init.d/packet_steering
@@ -16,7 +16,7 @@ service_triggers() {
 reload_service() {
 	packet_steering="$(uci -q get "network. at globals[0].packet_steering")"
 	steering_flows="$(uci -q get "network. at 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




More information about the lede-commits mailing list