Add force mtu option to dhcp-client.

This commit is contained in:
Arne Fitzenreiter
2010-11-30 20:49:04 +01:00
parent 989a31e20c
commit 0c719f9351
2 changed files with 13 additions and 0 deletions

View File

@@ -23,9 +23,21 @@ dhcpcd_up()
set | grep "^new_" | sed "s|^new_||g" | \
sort > /var/ipfire/dhcpc/dhcpcd-$interface.info
#Check if this was the Red device...
if [ ! "$interface" == "$RED_DEV" ]; then
exit 0;
fi
# Only if RED_TYPE=DHCP update /var/ipfire/red
if [ "$RED_TYPE" == "DHCP" ]; then
#Force MTU option for KabelDeutschland because this ISP
#set the MTU to 576 instead of the supportet 1500
if [ $RED_DHCP_FORCE_MTU -ge 576 ]; then
logger -p local0.info -t dhcpcd.exe[$$] "Force mtu to $RED_DHCP_FORCE_MTU"
ip link set $interface mtu $RED_DHCP_FORCE_MTU
fi
#Check if we have to restart the services at update
[ ! -e "/var/ipfire/red/active" ] update=1;
if [ "$old_domain_name_service" != "$new_domain_name_service" ]; then