]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't alter the MTU when testing.
authorRoy Marples <roy@marples.name>
Sat, 11 Jul 2009 15:14:54 +0000 (15:14 +0000)
committerRoy Marples <roy@marples.name>
Sat, 11 Jul 2009 15:14:54 +0000 (15:14 +0000)
dhcpcd-hooks/10-mtu

index fa82b753bb1536ac0247f278d7501e80ff628ce2..3f6e1750b2ab9422e335bbb4af361802c0b982af 100644 (file)
@@ -4,7 +4,7 @@ mtu_dir="$state_dir/mtu"
 
 if [ "$reason" = PREINIT -a -e "$mtu_dir/$interface" ]; then
        rm "$mtu_dir/$interface"
-elif [ -n "$new_interface_mtu" ]; then
+elif [ "$reason" != TEST -a -n "$new_interface_mtu" ]; then
        # The smalled MTU dhcpcd can work with is 576
        if [ "$new_interface_mtu" -ge 576 ]; then
                if ifconfig "$interface" mtu "$new_interface_mtu"; then
@@ -16,7 +16,7 @@ elif [ -n "$new_interface_mtu" ]; then
                        fi
                fi
        fi
-elif [ -e "$mtu_dir/$interface" ]; then
+elif [ "$reason" != TEST -a -e "$mtu_dir/$interface" ]; then
        # No MTU in this state, so restore the prior MTU
        mtu=$(cat "$mtu_dir/$interface")
        syslog info "$interface: MTU restored to $mtu"