5
0
mirror of git://git.proxmox.com/git/pve-network.git synced 2025-01-03 05:17:58 +03:00

dhcp: dnsmasq: send mtu option via dhcp

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
This commit is contained in:
Stefan Hanreich 2024-04-22 15:15:34 +02:00 committed by Thomas Lamprecht
parent 41e8c887c1
commit e19974f446
3 changed files with 8 additions and 3 deletions

View File

@ -84,7 +84,7 @@ sub regenerate_config {
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}}) {

View File

@ -177,7 +177,7 @@ sub systemctl_service {
}
sub before_configure {
my ($class, $dhcpid) = @_;
my ($class, $dhcpid, $zone_cfg) = @_;
my $dbus_config = <<DBUSCFG;
<!DOCTYPE busconfig PUBLIC
@ -218,6 +218,8 @@ CFG
$default_config
);
my $mtu = PVE::Network::SDN::Zones::get_mtu($zone_cfg);
my $default_dnsmasq_config = <<CFG;
except-interface=lo
enable-ra
@ -228,6 +230,9 @@ dhcp-leasefile=$DNSMASQ_LEASE_ROOT/dnsmasq.$dhcpid.leases
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"

View File

@ -43,7 +43,7 @@ sub configure_vnet {
}
sub before_configure {
my ($class, $dhcpid) = @_;
my ($class, $dhcpid, $zone_config) = @_;
die 'implement in sub class';
}