From 3f3252f6421234a27cab4bf71575317e78d6dcaa Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 8 Mar 2013 09:33:12 -0300 Subject: When reset parent to default mtu, deal with all VLANs too --- etc/inc/interfaces.inc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 2979ab6..1e62611 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2995,8 +2995,20 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven pfSense_interface_mtu($vlan['vlanif'], $mtu); } pfSense_interface_mtu($realif, $mtu); - } else if ($mtu != get_interface_mtu($realhwif)) - pfSense_interface_mtu($realhwif, $mtu); + } else { + /* All vlans need to use the same mtu value as their parent. */ + foreach ($vlanifs as $vlan) { + $assignedport = convert_real_interface_to_friendly_interface_name($vlan['vlanif']); + if (!empty($assignedport)) { + $portmtu = $config['interfaces'][$assignedport]['mtu']; + if (empty($portmtu)) + pfSense_interface_mtu($vlan['vlanif'], $mtu); + } else + pfSense_interface_mtu($vlan['vlanif'], $mtu); + } + if ($mtu != get_interface_mtu($realhwif)) + pfSense_interface_mtu($realhwif, $mtu); + } unset($vlanifs); -- cgit v1.1