openwrt / netifd

[MIRROR] OpenWrt Network interface configuration daemon
https://git.openwrt.org/?p=project/netifd.git;
17 stars 19 forks source link

uci set network.lan.enabled=0 doesn't work #11

Closed lynxis closed 11 months ago

lynxis commented 11 months ago

Setting enabled=0 doesn't work properly. E.g. use an pc-engines apu1 with default configuration.

config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'eth1'
    list ports 'eth2'

config interface 'lan'
    option device 'br-lan'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option enabled '0'
uci set network.lan.enabled=0
reload_config
sleep 3
ifstatus lan |grep '"up"'
    "up": true,

But it should be disabled.

ynezz commented 11 months ago

From https://openwrt.org/docs/guide-user/base-system/basic-networking#options_valid_for_all_protocol_types

Name Type Required Default Description
disabled boolean no 0 enable or disable the interface section

So uci set network.lan.disabled=1 is the correct command.