mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 15:45:23 +00:00
Fixed bad gateway
This commit is contained in:
parent
207df02d4d
commit
d1cf4a0ffb
1 changed files with 2 additions and 6 deletions
|
@ -9,12 +9,8 @@ def network_size(net, dhcp=None):
|
|||
"""
|
||||
mask = IP(net).strNetmask()
|
||||
addr = IP(net)
|
||||
if addr[0].strNormal()[-1] == '0':
|
||||
gateway = addr[1].strNormal()
|
||||
dhcp_pool = [addr[2].strNormal(), addr[addr.len() - 2].strNormal()]
|
||||
else:
|
||||
gateway = addr[0].strNormal()
|
||||
dhcp_pool = [addr[1].strNormal(), addr[addr.len() - 2].strNormal()]
|
||||
gateway = addr[1].strNormal()
|
||||
dhcp_pool = [addr[2].strNormal(), addr[addr.len() - 2].strNormal()]
|
||||
if dhcp:
|
||||
return gateway, mask, dhcp_pool
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue