diff options
author | Bill Nottingham <notting@redhat.com> | 2002-03-11 20:03:34 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2002-03-11 20:03:34 +0000 |
commit | 1c2c8570e39575310635e159e22b56512fbc02dc (patch) | |
tree | 9dbc93717f517542f77c0b6f0db5d9541f8f6e2b | |
parent | 35c33a5e249e7c90a80441a99a6b98afed7af241 (diff) | |
download | initscripts-1c2c8570e39575310635e159e22b56512fbc02dc.tar initscripts-1c2c8570e39575310635e159e22b56512fbc02dc.tar.gz initscripts-1c2c8570e39575310635e159e22b56512fbc02dc.tar.bz2 initscripts-1c2c8570e39575310635e159e22b56512fbc02dc.tar.xz initscripts-1c2c8570e39575310635e159e22b56512fbc02dc.zip |
minor tweak
-rwxr-xr-x | sysconfig/network-scripts/ifup | 7 |
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} |