Commit a364b7ec authored by Darren 'Tadgy' Austin's avatar Darren 'Tadgy' Austin

Move setting of MTU to after interface has been brought up. DHCP may have set...

Move setting of MTU to after interface has been brought up.  DHCP may have set the MTU to what the DHCP server advertises, but our over-ride should take presidence.
parent 1e25625d
......@@ -161,10 +161,6 @@ if_up() {
echo "/etc/rc.d/rc.inet1: /sbin/ip link set dev ${1} address ${HWADDR[$i]}" | $LOGGER
/sbin/ip link set dev ${1} address ${HWADDR[$i]}
fi
if [ -n "${MTU[$i]}" ]; then # Set MTU to something else than 1500
echo "/etc/rc.d/rc.inet1: /sbin/ip link set dev ${1} mtu ${MTU[$i]}" | $LOGGER
/sbin/ip link set dev ${1} mtu ${MTU[$i]}
fi
if [ -x /etc/rc.d/rc.wireless ]; then
. /etc/rc.d/rc.wireless ${1} start # Initialize any wireless parameters
fi
......@@ -265,6 +261,10 @@ if_up() {
debug_log "${1} interface is not configured in /etc/rc.d/rc.inet1.conf"
return
fi
if [ -n "${MTU[$i]}" ]; then # Force an MTU (possibly over-riding that set by DHCP)
echo "/etc/rc.d/rc.inet1: /sbin/ip link set dev ${1} mtu ${MTU[$i]}" | $LOGGER
/sbin/ip link set dev ${1} mtu ${MTU[$i]}
fi
else
debug_log "${1} is already up, skipping"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment