Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
PVE::Network::SDN::Zones::Plugin->init();
my $local_network_sdn_file = "/etc/network/interfaces.d/sdn";
+my $default_mtu = 1500;
sub sdn_zones_config {
my ($cfg, $id, $noerr) = @_;
$plugin->del_bridge_fdb($plugin_config, $iface, $macaddr);
}
+sub get_mtu {
+ my ($zone_config) = @_;
+
+ my $plugin = PVE::Network::SDN::Zones::Plugin->lookup($zone_config->{type});
+ return $plugin->get_mtu($zone_config) // $default_mtu;
+}
+
1;
return PVE::Cluster::cfs_read_file('datacenter.cfg');
}
+
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ die "please implement inside plugin";
+}
+
1;
my $mac = $vnet->{mac};
my $alias = $vnet->{alias};
- my $mtu = $plugin_config->{mtu} if $plugin_config->{mtu};
+ my $mtu = $class->get_mtu($plugin_config);
# vnet bridge
my @iface_config = ();
}
}
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ return $plugin_config->{mtu};
+}
+
1;