-
Notifications
You must be signed in to change notification settings - Fork 324
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
Regenerate network and system UCI configs on every reconfigure, switch to role-based interface configuration #2372
Commits on Feb 22, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c2a5f57 - Browse repository at this point
Copy the full SHA c2a5f57View commit details -
gluon-core: sysconfig: avoid unnecessary writes
Do not write files when the content is unchanged. Avoids a few unnecessary filesystem writes when resetting ifname sysconfigs on each upgrade.
Configuration menu - View commit details
-
Copy full SHA for 05c2951 - Browse repository at this point
Copy the full SHA 05c2951View commit details -
gluon-core: initialize interfaces role configuration
The new configuration generates sections iface_single/lan/wan in /etc/config/gluon. These sections usually refer to a sysconfig-controlled interface list, but adding custom sections with verbatim interfaces names is also possible. Each interface section contains a list of roles. The supported roles are 'client', 'uplink' and 'mesh'. Multiple roles can be configured on the same interface (for example the old 'mesh_on_wan' setting would become 'uplink'+'mesh'). 'client' is subsumed by any other role configured on the same interface ('client'+'mesh' is equivalent to 'mesh'). This property is important, as it allows the Wired Mesh settings in gluon-web-network to simply add and remove the mesh role without having to care what other roles are set - so in the default setup, this would switch between 'client' and 'client'+'mesh' for the LAN interface. By default, the WAN interface has role 'uplink' and the LAN interface 'client'; if only a single interface exists, the roles from the WAN interface are used by default. The default for each of the three interfaces (WAN/LAN/single) can be changed separated in site.conf, superseding the old mesh_on_wan, mesh_on_lan and single_as_lan settings.
Configuration menu - View commit details
-
Copy full SHA for 4b8251c - Browse repository at this point
Copy the full SHA 4b8251cView commit details -
treewide: use interface roles as basis for network configuration
With the new role-based interface configuration, it would be better to rename the wan/wan6 interfaces to uplink/uplink6, but that would cause unnecessary churn for the firewall configuration, so it is left for a later update. As all interfaces with the 'uplink' role are in the br-wan bridge, it is not possible to assign these to the 'mesh' role independently - instead, br-wan is added as a mesh interface as soon as a single interface has both the 'uplink' and 'mesh' roles. The UCI section for this configuration is now called 'mesh_uplink' instead of 'mesh_wan'. For all interfaces that have the 'mesh', but not the 'uplink' role a second configuration 'mesh_other' is created. If there is more than one such interface, all these interfaces are bridged as well (creating a bridge 'br-mesh_other'). This replaces the 'mesh_lan' section with its optional 'br-mesh_lan' bridge, but can also include interfaces that were not considered "LAN" when interfaces roles are modified (via site.conf or manually).
Configuration menu - View commit details
-
Copy full SHA for c779d12 - Browse repository at this point
Copy the full SHA c779d12View commit details -
gluon-core, gluon-setup-mode: reset ifname sysconfigs on each update,…
… introduce single_ifname Allow interface names to change on updates to handle hwconfig -> DSA and similar migrations. On devices with only a single interface, a sysconfig single_ifname is created instead of wan_ifname or lan_ifname to allow separate configuration in site.conf.
Configuration menu - View commit details
-
Copy full SHA for 316e96a - Browse repository at this point
Copy the full SHA 316e96aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6dcee2e - Browse repository at this point
Copy the full SHA 6dcee2eView commit details -
gluon-core: preserve explicitly marked network and system sections
A section can be marked as preseved by setting the gluon_preserve option to 1. In addition the following conditions must hold: - The preserved section must not already exist after OpenWrt's and Gluons setup scripts run. Modifying existing sections is currently unsupported. - Preserved sections must be named, so it can be detected whether a section conflicts with a preexisting one.
Configuration menu - View commit details
-
Copy full SHA for a671b50 - Browse repository at this point
Copy the full SHA a671b50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 210cacd - Browse repository at this point
Copy the full SHA 210cacdView commit details