aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2002-03-11 20:03:34 +0000
committerBill Nottingham <notting@redhat.com>2002-03-11 20:03:34 +0000
commit1c2c8570e39575310635e159e22b56512fbc02dc (patch)
tree9dbc93717f517542f77c0b6f0db5d9541f8f6e2b
parent35c33a5e249e7c90a80441a99a6b98afed7af241 (diff)
downloadinitscripts-1c2c8570e39575310635e159e22b56512fbc02dc.tar
initscripts-1c2c8570e39575310635e159e22b56512fbc02dc.tar.gz
initscripts-1c2c8570e39575310635e159e22b56512fbc02dc.tar.bz2
initscripts-1c2c8570e39575310635e159e22b56512fbc02dc.tar.xz
initscripts-1c2c8570e39575310635e159e22b56512fbc02dc.zip
minor tweak
-rwxr-xr-xsysconfig/network-scripts/ifup7
1 files changed, 5 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 678ba257..47b6d385 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -215,17 +215,20 @@ else
if [ -n "$SRCADDR" ]; then
SRC="src $SRCADDR"
- sysctl -w "net.ipv4.conf.${REALDEVICE}.arp_filter=1"
else
SRC=
fi
-
+
if ! LC_ALL=C ip addr ls ${REALDEVICE} | grep -q "${IPADDR}/${PREFIX}" ; then
if ! ip addr add ${IPADDR}/${PREFIX} \
brd ${BROADCAST:-+} dev ${REALDEVICE} ${SCOPE} label ${DEVICE}; then
echo $"Error adding address ${IPADDR} for ${DEVICE}."
fi
fi
+
+ if [ -n "$SRCADDR" ]; then
+ sysctl -w "net.ipv4.conf.${REALDEVICE}.arp_filter=1" >/dev/null 2>&1
+ fi
# update ARP cache of neighboring computers
arping -q -A -c 1 -I ${REALDEVICE} ${IPADDR}