]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
dhcpcd: Remove old MTU setting script
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Feb 2022 12:18:05 +0000 (12:18 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Wed, 23 Feb 2022 15:46:45 +0000 (15:46 +0000)
This is being replaced by adding the MTU option to any routes that
dhcpcd installs.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
config/dhcpc/dhcpcd-hooks/10-mtu [deleted file]
config/rootfiles/common/dhcpcd
lfs/dhcpcd

diff --git a/config/dhcpc/dhcpcd-hooks/10-mtu b/config/dhcpc/dhcpcd-hooks/10-mtu
deleted file mode 100644 (file)
index 8eb4297..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# Configure the MTU for the interface
-
-eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
-
-set_mtu()
-{
-       local mtu=$1
-       ip link set "$interface" mtu "$mtu"
-
-       # test for buggy nic that lose link at mtu set...
-       carrier=`cat /sys/class/net/$interface/carrier`
-       if [ "$carrier" == "0" ]; then
-               syslog info "Warning! Carrier loss after MTU set. Reinit needed..."
-               ip link set "$interface" down
-               ip link set "$interface" up
-               exit 1
-       fi
-}
-
-if [ -n "$new_interface_mtu" ] && $if_up; then
-       if [ $RED_DHCP_FORCE_MTU -ge 576 ]; then
-               new_interface_mtu=$RED_DHCP_FORCE_MTU
-       fi
-       if [ ! "$new_interface_mtu" == "$ifmtu" ]; then
-               # The smalled MTU dhcpcd can work with is 576
-               if [ "$new_interface_mtu" -gt 576 ]; then
-                       if set_mtu "$new_interface_mtu"; then
-                               syslog info "MTU set to $new_interface_mtu"
-                       fi
-               fi
-       fi
-fi
-
index 672a47a30385a175a08f8e9e9e84a46e763e69db..d36b105f1905cf1ef33e168d2138f42e44d8839d 100644 (file)
@@ -9,7 +9,6 @@ var/ipfire/dhcpc/dhcpcd-hooks
 #var/ipfire/dhcpc/dhcpcd-hooks/00-linux
 #var/ipfire/dhcpc/dhcpcd-hooks/01-test
 #var/ipfire/dhcpc/dhcpcd-hooks/02-dump
-#var/ipfire/dhcpc/dhcpcd-hooks/10-mtu
 #var/ipfire/dhcpc/dhcpcd-hooks/30-hostname
 #var/ipfire/dhcpc/dhcpcd-hooks/70-dhcpcd.exe
 var/ipfire/dhcpc/dhcpcd-run-hooks
index 8c4a593ad140d0323482081b6943d430555b5ca5..8291d076a74f89e93f476a93946cc122e511f596 100644 (file)
@@ -90,7 +90,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        rm -f $(CONFIG_ROOT)/dhcpc/dhcpcd-hooks/50-ypbind
 
        install -m 644 $(DIR_SRC)/config/dhcpc/dhcpcd.conf $(CONFIG_ROOT)/dhcpc/
-       install -m 444 $(DIR_SRC)/config/dhcpc/dhcpcd-hooks/10-mtu $(CONFIG_ROOT)/dhcpc/dhcpcd-hooks
 
        chown root:root $(CONFIG_ROOT)/dhcpc/dhcpcd.conf