diff options
author | Darren 'Tadgy' Austin <darren@afterdark.org.uk> | 2018-07-28 01:39:18 +0100 |
---|---|---|
committer | Robby Workman <rworkman@slackware.com> | 2018-11-25 19:05:45 -0600 |
commit | 2fe66d0dc63826b6ec0eda7f2604f91ae42f53ed (patch) | |
tree | 0a9dc835f2f8f6363ffea1ea218dd1ffb71aaa41 | |
parent | 7dd411ec718e48c43f32c8c5fc40c4e6b104817f (diff) | |
download | slacknetsetup-2fe66d0dc63826b6ec0eda7f2604f91ae42f53ed.tar.xz |
Set MTU after interface is up (override dhcp server)
DHCP may have set the MTU to what the DHCP server advertises,
but our override should take precedence.
Signed-off-by: Robby Workman <rworkman@slackware.com>
-rw-r--r-- | rc.inet1 | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |