Skip to content

Commit

Permalink
luci-mod-network: add DHCPv6 NTP server config helper to interfaces
Browse files Browse the repository at this point in the history
Appears under DHCPv6-service when set to 'server' or 'hybrid'.

Option 'ntp' is serviced by odhcpd. It sends a DHCPv6 NTP Server option
56 for each 'ntp' list entry.

Once uci loads the system section, it provides suggestion presets of
system configured upstream NTP servers, and the LAN IP(v6) of the router
which are then statically configured by the user.

It would make more sense if odhcpd fetches them directly.
Alas, it does not (yet).

Signed-off-by: Paul Donald <[email protected]>
  • Loading branch information
systemcrash committed Apr 1, 2024
1 parent e5f8af1 commit 7235072
Show file tree
Hide file tree
Showing 39 changed files with 9,895 additions and 9,521 deletions.
509 changes: 259 additions & 250 deletions modules/luci-base/po/ar/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/ast/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/bg/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/bn_BD/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/ca/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/cs/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/da/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/de/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/el/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/en/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/es/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/fi/base.po

Large diffs are not rendered by default.

512 changes: 261 additions & 251 deletions modules/luci-base/po/fr/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/he/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/hi/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/hu/base.po

Large diffs are not rendered by default.

512 changes: 261 additions & 251 deletions modules/luci-base/po/it/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/ja/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/ko/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/lt/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/mr/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/ms/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/nb_NO/base.po

Large diffs are not rendered by default.

512 changes: 261 additions & 251 deletions modules/luci-base/po/nl/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/pl/base.po

Large diffs are not rendered by default.

512 changes: 261 additions & 251 deletions modules/luci-base/po/pt/base.po

Large diffs are not rendered by default.

512 changes: 261 additions & 251 deletions modules/luci-base/po/pt_BR/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/ro/base.po

Large diffs are not rendered by default.

512 changes: 261 additions & 251 deletions modules/luci-base/po/ru/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/sk/base.po

Large diffs are not rendered by default.

513 changes: 261 additions & 252 deletions modules/luci-base/po/sv/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/templates/base.pot

Large diffs are not rendered by default.

521 changes: 266 additions & 255 deletions modules/luci-base/po/tr/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/uk/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/ur/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/vi/base.po

Large diffs are not rendered by default.

525 changes: 268 additions & 257 deletions modules/luci-base/po/zh_Hans/base.po

Large diffs are not rendered by default.

509 changes: 259 additions & 250 deletions modules/luci-base/po/zh_Hant/base.po

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,8 @@ return view.extend({
s.load = function() {
return Promise.all([
network.getNetworks(),
firewall.getZones()
firewall.getZones(),
uci.load('system')
]).then(L.bind(function(data) {
this.networks = data[0];
this.zones = data[1];
Expand Down Expand Up @@ -988,6 +989,27 @@ return view.extend({
so.depends('dhcpv6', 'server');
so.depends({ dhcpv6: 'hybrid', master: '0' });

//This is a DHCPv6 specific odhcpd setting
so = ss.taboption('ipv6', form.DynamicList, 'ntp', _('NTP Servers'),
_('DHCPv6 option 56. %s.', 'DHCPv6 option 56. RFC5908 link').format('<a href="%s" target="_blank">RFC5908</a>').format('https://www.rfc-editor.org/rfc/rfc5908#section-4'));
so.datatype = 'host(0)';
for(var x of uci.get('system', 'ntp', 'server') || '') {
so.value(x);
}
var lan_net = this.networks.filter(function(n) { return n.getName() == 'lan' })[0];
// If ntpd is set up, suggest our IP(v6) also
if(uci.get('system', 'ntp', 'enable_server')) {
lan_net.getIPAddrs().forEach(function(i4) {
so.value(i4.split('/')[0]);
});
lan_net.getIP6Addrs().forEach(function(i6) {
so.value(i6.split('/')[0]);
});
}
so.optional = true;
so.rmempty = true;
so.depends('dhcpv6', 'server');
so.depends({ dhcpv6: 'hybrid', master: '0' });

so = ss.taboption('ipv6', cbiRichListValue, 'ndp', _('<abbr title="Neighbour Discovery Protocol">NDP</abbr>-Proxy'),
_('Configures the operation mode of the NDP proxy service on this interface.'));
Expand Down

0 comments on commit 7235072

Please sign in to comment.