- var ifc6 = info.wan6 || {};
-
- us.appendChild(renderBox(
- '<%:IPv6 Upstream%>',
- (ifc6.ifname && ifc6.proto != 'none'),
- [ E('div', {}, renderBadge(
- '<%=resource%>/icons/%s.png'.format(ifc6.type || 'ethernet_disabled'), null,
- '<%:Device%>', ifc6 ? (ifc6.name || ifc6.ifname || '-') : '-',
- '<%:MAC-Address%>', (ifc6 && ifc6.ether) ? ifc6.mac : null)) ],
- '<%:Protocol%>', ifc6.i18n ? (ifc6.i18n + (ifc6.proto === 'dhcp' && ifc6.ip6prefix ? '-PD' : '')) : E('em', '<%:Not connected%>'),
- '<%:Prefix Delegated%>', ifc6.ip6prefix,
- '<%:Address%>', (ifc6.ip6prefix) ? (ifc6.ip6addr || null) : (ifc6.ipaddr || '::'),
- '<%:Gateway%>', (ifc6.gw6addr) ? ifc6.gw6addr : '::',
- '<%:DNS%> 1', (ifc6.dns) ? ifc6.dns[0] : null,
- '<%:DNS%> 2', (ifc6.dns) ? ifc6.dns[1] : null,
- '<%:DNS%> 3', (ifc6.dns) ? ifc6.dns[2] : null,
- '<%:DNS%> 4', (ifc6.dns) ? ifc6.dns[3] : null,
- '<%:DNS%> 5', (ifc6.dns) ? ifc6.dns[4] : null,
- '<%:Connected%>', (ifc6.uptime > 0) ? '%t'.format(ifc6.uptime) : null));
+ var wan6_list = info.wan6 || [];
+
+ for (var i = 0; i < wan6_list.length; i++) {
+ var ifc6 = wan6_list[i];
+
+ us.appendChild(renderBox(
+ '<%:IPv6 Upstream%>',
+ (ifc6.ifname && ifc6.proto != 'none'),
+ [ E('div', {}, renderBadge(
+ '<%=resource%>/icons/%s.png'.format(ifc6.type || 'ethernet_disabled'), null,
+ '<%:Device%>', ifc6 ? (ifc6.name || ifc6.ifname || '-') : '-',
+ '<%:MAC-Address%>', (ifc6 && ifc6.ether) ? ifc6.mac : null)) ],
+ '<%:Protocol%>', ifc6.i18n ? (ifc6.i18n + (ifc6.proto === 'dhcp' && ifc6.ip6prefix ? '-PD' : '')) : E('em', '<%:Not connected%>'),
+ '<%:Prefix Delegated%>', ifc6.ip6prefix,
+ '<%:Address%>', (ifc6.ip6prefix) ? (ifc6.ip6addr || null) : (ifc6.ipaddr || '::'),
+ '<%:Gateway%>', (ifc6.gw6addr) ? ifc6.gw6addr : '::',
+ '<%:DNS%> 1', (ifc6.dns) ? ifc6.dns[0] : null,
+ '<%:DNS%> 2', (ifc6.dns) ? ifc6.dns[1] : null,
+ '<%:DNS%> 3', (ifc6.dns) ? ifc6.dns[2] : null,
+ '<%:DNS%> 4', (ifc6.dns) ? ifc6.dns[3] : null,
+ '<%:DNS%> 5', (ifc6.dns) ? ifc6.dns[4] : null,
+ '<%:Connected%>', (ifc6.uptime > 0) ? '%t'.format(ifc6.uptime) : null));
+ }