1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Display IPv6 in status only when gateway exist

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-01-25 16:43:15 +01:00
parent becf56df85
commit a0da499c10

View file

@ -469,7 +469,7 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
{ {
content += String.format('%s <strong>%s</strong><br />','<%:ip address:%>', ipaddr); content += String.format('%s <strong>%s</strong><br />','<%:ip address:%>', ipaddr);
} }
if(ip6addr !== '') if(ip6addr !== '' && gateway6 != '')
{ {
content += String.format('%s <strong>%s</strong><br />','<%:ipv6 address:%>', ip6addr); content += String.format('%s <strong>%s</strong><br />','<%:ipv6 address:%>', ip6addr);
} }
@ -477,7 +477,7 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
{ {
content += String.format('%s <strong>%s</strong><br />','<%:wan address:%>', wanip); content += String.format('%s <strong>%s</strong><br />','<%:wan address:%>', wanip);
} }
if(wanip6 !== '' && gateway6 != '') if(wanip6 !== '')
{ {
content += String.format('%s <strong>%s</strong><br />','<%:wan ipv6 address:%>', wanip6); content += String.format('%s <strong>%s</strong><br />','<%:wan ipv6 address:%>', wanip6);
} }