diff mbox series

[OpenWrt-Devel] ramips: fix IPv4-only corner case in 01_enable_packet_steering

Message ID 20200611092859.2254-1-freifunk@adrianschmutzler.de
State Accepted
Delegated to: Adrian Schmutzler
Headers show
Series [OpenWrt-Devel] ramips: fix IPv4-only corner case in 01_enable_packet_steering | expand

Commit Message

Adrian Schmutzler June 11, 2020, 9:28 a.m. UTC
The uci config section network.globals set up in /bin/config_generate
will only be created if /proc/sys/net/ipv6 exists.

Correspondingly, lacking IPv6 support, the command
uci set network.globals.packet_steering=1
will fail with "uci: Invalid argument" as the network.globals config
has not been set up.

Fix that by adding the setup there as well.

Fixes: dfd62e575c6c ("ramips: enable packet steering by default on mt7621")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
 .../mt7621/base-files/etc/uci-defaults/01_enable_packet_steering | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/target/linux/ramips/mt7621/base-files/etc/uci-defaults/01_enable_packet_steering b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/01_enable_packet_steering
index 6a77229f29..114c7e1a46 100644
--- a/target/linux/ramips/mt7621/base-files/etc/uci-defaults/01_enable_packet_steering
+++ b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/01_enable_packet_steering
@@ -1,4 +1,5 @@ 
 uci -q get network.globals.packet_steering > /dev/null || {
+	uci set network.globals='globals'
 	uci set network.globals.packet_steering=1
 	uci commit network