Merge "Point DHCP gateway to default gateway"
This commit is contained in:
commit
53c5a00f86
@ -400,8 +400,14 @@ interface first.")
|
||||
elif key == "ADMIN_NETWORK/dhcp_pool_end":
|
||||
self.edits[index].set_edit_text(dynamic_end)
|
||||
elif key == "ADMIN_NETWORK/dhcp_gateway":
|
||||
self.edits[index].set_edit_text(self.netsettings[
|
||||
self.activeiface]['addr'])
|
||||
gw = self.get_default_gateway_linux()
|
||||
if network.inSameSubnet(
|
||||
gw, dynamic_start,
|
||||
self.netsettings[self.activeiface]['netmask']):
|
||||
dhcp_gateway = gw
|
||||
else:
|
||||
dhcp_gateway = self.netsettings[self.activeiface]['addr']
|
||||
self.edits[index].set_edit_text(dhcp_gateway)
|
||||
|
||||
def refresh(self):
|
||||
self.getNetwork()
|
||||
|
Loading…
Reference in New Issue
Block a user