From 80124a050c626584f19fbac917276946224bcde7 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 1 Nov 2007 22:25:53 +0000 Subject: Work cleanly with bridges on kernels without TCP, #197791. --- net.Linux/iproute2.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'net.Linux/iproute2.sh') diff --git a/net.Linux/iproute2.sh b/net.Linux/iproute2.sh index e6652c0f..8357f259 100644 --- a/net.Linux/iproute2.sh +++ b/net.Linux/iproute2.sh @@ -43,6 +43,15 @@ _is_wireless() { grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/wireless } +_set_flag() { + local flag=$1 opt="on" + if [ "${flag#-}" != "${flag}" ]; then + flag=${flag#-} + opt="off" + fi + ip link set "${IFACE}" "${flag}" "${opt}" +} + _get_mac_address() { local mac=$(LC_ALL=C ip link show "${IFACE}" | sed -n \ -e 'y/abcdef/ABCDEF/' \ @@ -181,7 +190,8 @@ iproute2_pre_start() { } iproute2_post_start() { - ip route flush table cache dev "${IFACE}" + # Kernel may not have tcp built in + [ -e /proc/net/route ] && ip route flush table cache dev "${IFACE}" } iproute2_post_stop() { -- cgit v1.2.3