diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-07-30 17:09:48 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-07-30 17:09:48 +0000 |
commit | e258712681b3e5810107abe92bbf7b889fb9304e (patch) | |
tree | 3a3700f5d04dcdd92f7a71be3eb4023a0d1af08f /etc/inc/interfaces.inc | |
parent | 8fe0e6958dd702df4d1a4ffe1c2fa306917b471d (diff) | |
download | pfsense-e258712681b3e5810107abe92bbf7b889fb9304e.zip pfsense-e258712681b3e5810107abe92bbf7b889fb9304e.tar.gz |
Detect when we find an MTU of 0 and simply use 1500 and log the error.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 3f41474..7c1f6d5 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -154,6 +154,10 @@ function interfaces_lan_configure() { /* force all bridged interfaces to use same mtu */ $mtu = get_interface_mtu($config['interfaces'][$lancfg['bridge']]['if']); + if($mtu == "0") { + log_error("An error occurred while trying to obtain the MTU setting. Using 1500."); + $mtu = "1500"; + } mwexec("/sbin/ifconfig {$lancfg['if']} mtu {$mtu}"); mwexec("/sbin/ifconfig {$config['interfaces'][$lancfg['bridge']]['if']} mtu {$mtu}"); |