aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-06-27 20:37:32 +0000
committerBill Nottingham <notting@redhat.com>2003-06-27 20:37:32 +0000
commitbe897f4ad5d4f9dc88ec39acf399656ba5c96d9f (patch)
treeb043d8230d918a364edb5f07ffb35f702a654893
parentc49ae566f4f7c58a79b32a8fc17005c0f9495402 (diff)
downloadinitscripts-be897f4ad5d4f9dc88ec39acf399656ba5c96d9f.tar
initscripts-be897f4ad5d4f9dc88ec39acf399656ba5c96d9f.tar.gz
initscripts-be897f4ad5d4f9dc88ec39acf399656ba5c96d9f.tar.bz2
initscripts-be897f4ad5d4f9dc88ec39acf399656ba5c96d9f.tar.xz
initscripts-be897f4ad5d4f9dc88ec39acf399656ba5c96d9f.zip
allow default window size for routes to be set with WINDOW=... (#98112)
-rw-r--r--sysconfig.txt3
-rwxr-xr-xsysconfig/network-scripts/ifdown-post4
-rwxr-xr-xsysconfig/network-scripts/ifup6
-rw-r--r--sysconfig/network-scripts/network-functions6
4 files changed, 11 insertions, 8 deletions
diff --git a/sysconfig.txt b/sysconfig.txt
index 2e498285..608d77bc 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -510,6 +510,9 @@ Files in /etc/sysconfig/network-scripts/
USERCTL=yes|no
BOOTPROTO=none|bootp|dhcp
MTU=
+ Default MTU for this device
+ WINDOW=
+ Default window for routes from this device
PEERDNS=yes|no
modify /etc/resolv.conf if peer uses msdns extension (PPP only) or
DNS{1,2} are set, or if using pump or dhcpcd. default to "yes".
diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post
index b78399ee..6c244ca1 100755
--- a/sysconfig/network-scripts/ifdown-post
+++ b/sysconfig/network-scripts/ifdown-post
@@ -23,9 +23,9 @@ if ! check_default_route ; then
# ISDN device needs special handling dial on demand
if [ "${DEVICETYPE}" = "ippp" -o "${DEVICETYPE}" = "isdn" ] && [ "$DIALMODE" = "auto" ] ; then
if [ -z "$GATEWAY" ] ; then
- /sbin/ip route add default dev ${DEVICE}
+ /sbin/ip route add default ${WINDOW:+window $WINDOW} dev ${DEVICE}
else
- /sbin/ip route add default via ${GATEWAY}
+ /sbin/ip route add default ${WINDOW:+window $WINDOW} via ${GATEWAY}
fi
else
add_default_route ${DEVICE}
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 4aa0b55f..d73288f0 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -329,16 +329,16 @@ else
# Add a route for the subnet. Replace any existing route.
if [ "${ISALIAS}" = no -a "${NETMASK}" != "255.255.255.255" ]; then
- ip route replace ${NETWORK}/${PREFIX} ${SRC} dev ${REALDEVICE}
+ ip route replace ${NETWORK}/${PREFIX} ${SRC} ${WINDOW:+window $WINDOW} dev ${REALDEVICE}
fi
# Set a default route.
if [ -z "${GATEWAYDEV}" -o "${GATEWAYDEV}" = "${REALDEVICE}" ]; then
# set up default gateway. replace if one already exists
if [ -n "${GATEWAY}" -a "`ipcalc --network ${GATEWAY} ${NETMASK} 2>/dev/null`" = "NETWORK=${NETWORK}" ]; then
- ip route replace default via ${GATEWAY} ${SRC}
+ ip route replace default via ${GATEWAY} ${WINDOW:+window $WINDOW} ${SRC}
elif [ "${GATEWAYDEV}" = "${DEVICE}" ]; then
- ip route replace default ${SRC} dev ${REALDEVICE}
+ ip route replace default ${SRC} ${WINDOW:+window $WINDOW} dev ${REALDEVICE}
fi
fi
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 8511680b..19a274e5 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -261,13 +261,13 @@ add_default_route ()
"${GATEWAY}" != "none" ]; then
if ! check_device_down $1; then
if [ "$GATEWAY" = "0.0.0.0" ]; then
- /sbin/ip route add default dev ${GATEWAYDEV}
+ /sbin/ip route add default ${WINDOW:+window $WINDOW} dev ${GATEWAYDEV}
else
- /sbin/ip route add default via ${GATEWAY}
+ /sbin/ip route add default ${WINDOW:+window $WINDOW} via ${GATEWAY}
fi
fi
elif [ -f /etc/default-route ]; then
- /sbin/ip route add default via `cat /etc/default-route`
+ /sbin/ip route add default ${WINDOW:+window $WINDOW} via `cat /etc/default-route`
rm -f /etc/default-route
fi
}