-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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-mod-network: Fix 'instances' fields for dnsmasq dhcp config entries #6579
luci-mod-network: Fix 'instances' fields for dnsmasq dhcp config entries #6579
Conversation
Please make the caption translatable and provide a translation context hint: |
Yessir. Done. |
LGTM |
@systemcrash My 2 cents: while it's certainly an improvement and the code looks very neat, would it not be better to instead do something like: |
Valid points! The first one I might steal. Although I don't think it's a bad idea that users see what's going on also under the hood (and see those anonymous names). I'll give those a try and see how they look. Thanks for the input. |
You also need to make |
That should satisfy everything, I think. The only translatables in there are
|
Fixed error wherein luci erroneously saved the iterator integer of the current dnsmasq config object to a host (and boot/PXE) config entry 'instance' field, instead of correctly referring to its name. Now we use the correct ".name" field of the dnsmasq config entry. Anonymous entries have e.g. "cfg01411c". The ".name" field corresponds to 'myName' in /etc/config/dhcp entries of: config dnsmasq 'myName' ... In this way, host and other entry types are bound correctly to specific dnsmasq instances. For anonymous entries, display "dnsmasq[x]" as name. Signed-off-by: Paul Donald <newtwen@gmail.com>
luci-mod-network: Fix 'instances' fields for dnsmasq dhcp config entries (cherry picked from commit d353bc5)
luci-mod-network: Fix 'instances' fields for dnsmasq dhcp config entries (cherry picked from commit d353bc5)
Fix an error wherein luci erroneously saved the iterator integer of the current dnsmasq config object to a host (and boot/PXE) config entry 'instance' field, instead of correctly referring to its name.
Now we use the correct
.name
field of the dnsmasq config entry. Anonymous entries have e.g.cfg01411c
. The.name
field corresponds to'myName'
in/etc/config/dhcp
entries of:In this way, host and other entry types are bound correctly to specific dnsmasq instances.
Looks like:
Tested on 23.05.2
See forum discussion here
FAO: @jow- @hnyman