Updated check as per code review

This commit is contained in:
David Murphy 2016-09-22 13:18:30 -06:00
parent cbcdb472fe
commit b68f982c6a

View file

@ -589,10 +589,10 @@ def _interfaces_ifconfig(out):
if not salt.utils.is_sunos():
ipv6scope = mmask6.group(3) or mmask6.group(4)
addr_obj['scope'] = ipv6scope.lower() if ipv6scope is not None else ipv6scope
if salt.utils.is_sunos():
if addr_obj['address'] != '::' and addr_obj['prefixlen'] != 0: # SunOS sometimes has ::/0 as inet6 addr when using addrconf
data['inet6'].append(addr_obj)
else:
# SunOS sometimes has ::/0 as inet6 addr when using addrconf
if not salt.utils.is_sunos() \
or addr_obj['address'] != '::' \
and addr_obj['prefixlen'] != 0:
data['inet6'].append(addr_obj)
data['up'] = updown
if iface in ret: