Use a proper variable for vni_mtu

This commit is contained in:
Joshua Boniface 2019-06-18 00:01:12 -04:00
parent 1f92b90a3e
commit 46a416bc78
1 changed files with 3 additions and 2 deletions

View File

@ -38,6 +38,7 @@ class VXNetworkInstance(object):
self.logger = logger self.logger = logger
self.this_node = this_node self.this_node = this_node
self.vni_dev = config['vni_dev'] self.vni_dev = config['vni_dev']
self.vni_mtu = config['vni_mtu']
self.nettype = zkhandler.readdata(self.zk_conn, '/networks/{}/nettype'.format(self.vni)) self.nettype = zkhandler.readdata(self.zk_conn, '/networks/{}/nettype'.format(self.vni))
if self.nettype == 'bridged': if self.nettype == 'bridged':
@ -438,7 +439,7 @@ add rule inet filter forward ip6 saddr {netaddr6} counter jump {vxlannic}-out
) )
) )
vx_mtu = self.config.vni_mtu vx_mtu = self.vni_mtu
common.run_os_command( common.run_os_command(
'ip link set {} mtu {} up'.format( 'ip link set {} mtu {} up'.format(
self.vlan_nic, self.vlan_nic,
@ -486,7 +487,7 @@ add rule inet filter forward ip6 saddr {netaddr6} counter jump {vxlannic}-out
) )
) )
vx_mtu = self.config.vni_mtu - 50 vx_mtu = self.vni_mtu - 50
common.run_os_command( common.run_os_command(
'ip link set {} mtu {} up'.format( 'ip link set {} mtu {} up'.format(
self.vxlan_nic, self.vxlan_nic,