From f57b0965d5be4a4af2ef297d9f6168bb0d014a22 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 20 Mar 2006 00:10:53 +0000 Subject: [PATCH] add _mtu setting for dhcp and static SVN-Revision: 3412 --- openwrt/package/base-files/default/etc/functions.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index c1828d5448..7c31539721 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -45,8 +45,9 @@ do_ifup() { ip=$(nvram get ${2}_ipaddr) netmask=$(nvram get ${2}_netmask) gateway=$(nvram get ${2}_gateway) + mtu=$(nvram get ${2}_mtu) - $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} broadcast + up + $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} ${mtu:+mtu $(($mtu))} broadcast + up ${gateway:+$DEBUG route add default gw $gateway} [ -f /etc/resolv.conf ] || { @@ -61,7 +62,8 @@ do_ifup() { dhcp) DHCP_IP=$(nvram get ${2}_ipaddr) DHCP_NETMASK=$(nvram get ${2}_netmask) - $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} broadcast + up + mtu=$(nvram get ${2}_mtu) + $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} ${mtu:+mtu $(($mtu))} broadcast + up DHCP_ARGS="-i $if ${DHCP_IP:+-r $DHCP_IP} -b -p $pidfile" DHCP_HOSTNAME=$(nvram get ${2}_hostname) -- 2.30.2