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

luci-base/luci-mod-network: handle default protocol for UCI interfaces #7538

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

erikrk
Copy link

@erikrk erikrk commented Jan 8, 2025

The protocol defaults to 'none' in netifd if unspecified.

  • This PR is not from my main or master branch πŸ’©, but a separate branch βœ…
  • Each commit has a valid βœ’οΈ Signed-off-by: <my@email.address> row (via git commit --signoff)
  • Each commit and PR title has a valid πŸ“ <package name>: title first line subject for packages
  • Incremented πŸ†™ any PKG_VERSION in the Makefile
  • Tested on: (architecture, openwrt version, browser) βœ…
  • ( Preferred ) Mention: @ the original code author for feedback
  • ( Preferred ) Screenshot or mp4 of changes:
  • ( Optional ) Closes: e.g. openwrt/luci#issue-number
  • ( Optional ) Depends on: e.g. openwrt/packages#pr-number in sister repo
  • Description: (describe the changes proposed in this PR)

Erik Karlsson added 2 commits January 8, 2025 17:36
The protocol defaults to 'none' in netifd if unspecified.

Signed-off-by: Erik Karlsson <erik.karlsson@iopsys.eu>
The protocol defaults to 'none' in netifd if unspecified.

Some previously unused and some now redundant code is also removed.

Signed-off-by: Erik Karlsson <erik.karlsson@iopsys.eu>
@systemcrash
Copy link
Contributor

The reason 'none' is not included is to force the user to choose one of the installed protos, or to go and install one. Settling on 'none' just allows a user to indefinitely ignore an interface until a later time. What is your use to have 'none'?

@erikrk
Copy link
Author

erikrk commented Jan 9, 2025

The issue is that perfectly valid UCI which may for example have been generated by an alternative management method gets reported erroneously as "Unsupported protocol type" while the interface may in fact be up and running just fine as for example an unmanaged bridge. I think if it is "wrong" to not provide the 'proto' option then netifd should not accept such configuration. The configuration IS accepted by netifd and it is treated exactly as if 'proto' were set to 'none', i.e. 'none' acts as default value for the 'proto' option. This default value should of course as per usual be reflected in LuCI so valid configuration is not shown as faulty.

@systemcrash
Copy link
Contributor

Do you have an opinion here @jow- ?

@systemcrash systemcrash merged commit 070b2e5 into openwrt:master Jan 22, 2025
5 checks passed
@erikrk erikrk deleted the proto-none branch January 22, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants