filter out invalid 0.0.0.0 ipv4

This commit is contained in:
Gilles Grandou 2019-12-17 13:58:54 +01:00
parent 79337e8411
commit 055f4949cd

View File

@ -71,6 +71,8 @@ def get_wan_addr():
wan = dict() wan = dict()
wan['ipv4'] = r['data']['IPAddress'] wan['ipv4'] = r['data']['IPAddress']
wan['ipv6'] = r['data']['IPv6Address'] wan['ipv6'] = r['data']['IPv6Address']
if wan['ipv4'] == '0.0.0.0':
wan['ipv4'] = ''
return wan return wan