Skip to content

[openwrt] Enabled interfaces inadvertently get "disabled 0" #57

@nemesifier

Description

@nemesifier

The following NetJSON DeviceConfiguration object:

{
    "interfaces": [
        {
            "type": "ethernet",
            "name": "eth0",
            "disabled": false
        }
    ]
}

Is converted to the following UCI configuration:

package network

config interface 'eth0'
	option disabled '0'
	option ifname 'eth0'
	option proto 'none'

But according to the OpenWRT network documentation the option disabled does not exist: the right keyword is enabled.

Strangely, disabling the interface:

{
    "interfaces": [
        {
            "type": "ethernet",
            "name": "eth0",
            "disabled": true
        }
    ]
}

returns a correct UCI configuration:

package network

config interface 'eth0'
	option enabled '0'
	option ifname 'eth0'
	option proto 'none'

It's just a minor inconsistency but it's quite disorienting.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions