summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren 'Tadgy' Austin <darren@afterdark.org.uk>2018-07-28 01:39:18 +0100
committerRobby Workman <rworkman@slackware.com>2018-11-25 19:05:45 -0600
commit2fe66d0dc63826b6ec0eda7f2604f91ae42f53ed (patch)
tree0a9dc835f2f8f6363ffea1ea218dd1ffb71aaa41
parent7dd411ec718e48c43f32c8c5fc40c4e6b104817f (diff)
downloadslacknetsetup-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.inet18
1 files changed, 4 insertions, 4 deletions
diff --git a/rc.inet1 b/rc.inet1
index 68d2625..39eaf63 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -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