Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nemesisdesign opened this issue Jan 17, 2017 · 1 comment
Closed

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

nemesisdesign opened this issue Jan 17, 2017 · 1 comment
Assignees
Labels
bug

Comments

@nemesisdesign
Copy link
Member

@nemesisdesign nemesisdesign commented Jan 17, 2017

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.

@nemesisdesign nemesisdesign added the bug label Jan 17, 2017
@nemesisdesign nemesisdesign self-assigned this Jan 17, 2017
nemesisdesign added a commit that referenced this issue Jan 17, 2017
Fixes issue #57
See #57
nemesisdesign added a commit that referenced this issue Jan 17, 2017
See #57
@nemesisdesign
Copy link
Member Author

@nemesisdesign nemesisdesign commented Jan 17, 2017

Fixed by 88ef58c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant