Skip to content

Commit

Permalink
luci-mod-network: Correctly assign dnsmasq instance: name not number
Browse files Browse the repository at this point in the history
Closes openwrt#7199

Signed-off-by: Paul Donald <[email protected]>
  • Loading branch information
systemcrash committed Jul 23, 2024
1 parent e55f9d9 commit 5ab0cb1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function generateDnsmasqInstanceEntry(data) {
}
formatString += ')';

return nameValueMap.get('.name'), formatString;
return [nameValueMap.get('.name'), formatString];
}

function getDHCPPools() {
Expand Down Expand Up @@ -830,8 +830,8 @@ return view.extend({
so.optional = true;

Object.values(L.uci.sections('dhcp', 'dnsmasq')).forEach(function(val, index) {
var name, display_str = generateDnsmasqInstanceEntry(val);
so.value(index, display_str);
var [name, display_str] = generateDnsmasqInstanceEntry(val);
so.value(name, display_str);
});

o = s.taboption('dnsrecords', form.SectionValue, '__dnsrecords__', form.TypedSection, '__dnsrecords__');
Expand Down Expand Up @@ -1125,8 +1125,8 @@ return view.extend({
so.optional = true;

Object.values(L.uci.sections('dhcp', 'dnsmasq')).forEach(function(val, index) {
var name, display_str = generateDnsmasqInstanceEntry(val);
so.value(index, display_str);
var [name, display_str] = generateDnsmasqInstanceEntry(val);
so.value(name, display_str);
});


Expand Down

0 comments on commit 5ab0cb1

Please sign in to comment.