Only remove gateways when managed

This commit is contained in:
Joshua Boniface 2019-03-17 13:19:44 -04:00
parent 3ec09686d2
commit deb4247e25
1 changed files with 5 additions and 4 deletions

View File

@ -716,10 +716,11 @@ add rule inet filter forward ip6 saddr {netaddr6} counter jump {vxlannic}-out
common.reload_firewall_rules(self.logger, nftables_base_filename) common.reload_firewall_rules(self.logger, nftables_base_filename)
def removeGateways(self): def removeGateways(self):
if self.ip6_gateway != 'None': if self.nettype == 'managed':
self.removeGateway6Address() if self.ip6_gateway != 'None':
if self.ip4_gateway != 'None': self.removeGateway6Address()
self.removeGateway4Address() if self.ip4_gateway != 'None':
self.removeGateway4Address()
def removeGateway6Address(self): def removeGateway6Address(self):
self.logger.out( self.logger.out(