Skip to content

Commit 8ae7b20

Browse files
authored
Merge pull request #5 from Zmegolaz/networks-mask-fix
Fix: ipv6_netmask_txt and ipv4_netmask_dec in table network.
2 parents a0cf3ab + 218681d commit 8ae7b20

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ def master_network(l, c, r):
4040
net_ipv4 = ipcalc.Network(ipv4)
4141
ipv4_gateway = net_ipv4[1]
4242
ipv4_netmask = str(net_ipv4.netmask())
43-
ipv4_netmask_dec = int(str(l[2]).split("/")[1])
43+
ipv4_netmask_dec = int(str(r[2]).split("/")[1])
4444

4545
# IPv6
4646
ipv6 = l[2]
4747
_current_v6_base = ipv6.split('::', 1)[0]
4848

4949
last_digits = int(str(ipv4_gateway).split('.')[-1])
50-
ipv6_netmask = 64
50+
ipv6_netmask = int(ipv6.split('/', 1)[1])
5151
ipv6_gateway = "%s::1" % (_current_v6_base, )
5252

5353
name = '%s@%s' % (_current_domain, short_name)

0 commit comments

Comments
 (0)