Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
die "Could not find DHCP plugin: $dhcp_plugin_name" if !$dhcp_plugin;
- eval { $dhcp_plugin->before_configure($zoneid) };
+ eval { $dhcp_plugin->before_configure($zoneid, $zone) };
die "Could not run before_configure for DHCP server $zoneid $@\n" if $@;
for my $vnetid (sort keys %{$vnet_cfg->{ids}}) {
}
sub before_configure {
- my ($class, $dhcpid) = @_;
+ my ($class, $dhcpid, $zone_cfg) = @_;
my $dbus_config = <<DBUSCFG;
<!DOCTYPE busconfig PUBLIC
$default_config
);
+ my $mtu = PVE::Network::SDN::Zones::get_mtu($zone_cfg);
+
my $default_dnsmasq_config = <<CFG;
except-interface=lo
enable-ra
dhcp-hostsfile=$config_directory/ethers
dhcp-ignore=tag:!known
+dhcp-option=26,$mtu
+ra-param=*,mtu:$mtu,0
+
# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave.
dhcp-option=252,"\\n"
}
sub before_configure {
- my ($class, $dhcpid) = @_;
+ my ($class, $dhcpid, $zone_config) = @_;
die 'implement in sub class';
}