From 40f36da9059f3fbc245a3bd49e0e776faa800082 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 17 Aug 2023 08:45:49 +0200 Subject: [PATCH] interfaces: adjust MTU before creating IPv4 config This is possible now since we no longer set the MTU on the PPP device, wich is not created before IPv4 handling. We may have to add the MTU to the PPPoE device as well, but from the looks of it this does not matter for one reason or another. --- src/etc/inc/interfaces.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 3a1ea7d00..85fe2fb11 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -2294,6 +2294,10 @@ function interface_configure($verbose = false, $interface = 'wan', $reload = fal /* apply interface hardware settings (tso, lro, ..) */ configure_interface_hardware($realhwif, $ifconfig_details); + if (!empty($wancfg['mtu']) && strpos($realhwif, '/') === false) { + interface_configure_mtu($realhwif, $wancfg['mtu'], $ifconfig_details); + } + switch ($wancfg['ipaddr'] ?? '') { case 'dhcp': interface_dhcp_configure($interface); @@ -2359,10 +2363,6 @@ function interface_configure($verbose = false, $interface = 'wan', $reload = fal mwexecf('/sbin/ifconfig %s inet6 description %s up', [$realifv6, $interface_descr]); } - if (!empty($wancfg['mtu']) && strpos($realhwif, '/') === false) { - interface_configure_mtu($realhwif, $wancfg['mtu'], $ifconfig_details); - } - interfaces_vips_configure($interface); /* XXX device plugin hook */