Only manage DHCP on managed networks

This commit is contained in:
Joshua Boniface 2019-03-17 12:35:25 -04:00
parent c52a1845e3
commit 3df8365851
1 changed files with 2 additions and 2 deletions

View File

@ -537,7 +537,7 @@ add rule inet filter forward ip6 saddr {netaddr6} counter jump {vxlannic}-out
common.createIPAddress(self.ip4_gateway, self.ip4_cidrnetmask, self.bridge_nic) common.createIPAddress(self.ip4_gateway, self.ip4_cidrnetmask, self.bridge_nic)
def startDHCPServer(self): def startDHCPServer(self):
if self.this_node.router_state == 'primary': if self.this_node.router_state == 'primary' and self.nettype == 'managed':
self.logger.out( self.logger.out(
'Starting dnsmasq DHCP server on interface {}'.format( 'Starting dnsmasq DHCP server on interface {}'.format(
self.bridge_nic self.bridge_nic
@ -746,7 +746,7 @@ add rule inet filter forward ip6 saddr {netaddr6} counter jump {vxlannic}-out
common.removeIPAddress(self.ip4_gateway, self.ip4_cidrnetmask, self.bridge_nic) common.removeIPAddress(self.ip4_gateway, self.ip4_cidrnetmask, self.bridge_nic)
def stopDHCPServer(self): def stopDHCPServer(self):
if self.dhcp_server_daemon: if self.nettype == 'managed' and self.dhcp_server_daemon:
self.logger.out( self.logger.out(
'Stopping dnsmasq DHCP server on interface {}'.format( 'Stopping dnsmasq DHCP server on interface {}'.format(
self.bridge_nic self.bridge_nic