Merge 00b61e53e5 into ba4cdb217b
This commit is contained in:
commit
72ff5ef42b
2 changed files with 15 additions and 8 deletions
|
|
@ -81,7 +81,7 @@ class Network(object):
|
|||
#
|
||||
for addr in ip6_addr:
|
||||
addr["addr"] = addr["addr"].replace('%{}'.format(interface), '')
|
||||
addr["netmask"] = addr["netmask"].split('/')[0]
|
||||
addr["mask"] = addr["mask"].split('/')[0]
|
||||
ip_addr.append(addr)
|
||||
|
||||
mac = open('/sys/class/net/{}/address'.format(interface), 'r').read().strip()
|
||||
|
|
@ -109,7 +109,7 @@ class Network(object):
|
|||
'ip': [
|
||||
'{}/{}'.format(
|
||||
x['addr'],
|
||||
IPAddress(x['netmask']).netmask_bits()
|
||||
IPAddress(x['mask']).netmask_bits()
|
||||
) for x in ip_addr
|
||||
] if ip_addr else None, # FIXME: handle IPv6 addresses
|
||||
'ethtool': Ethtool(interface).parse(),
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue