aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
authorPreston Brown <pbrown@redhat.com>2001-09-25 18:24:28 +0000
committerPreston Brown <pbrown@redhat.com>2001-09-25 18:24:28 +0000
commit779670cae04691237a793e7a19f19fd3c2b797d3 (patch)
tree2dc6619ed1b64f9626379f98ab7f6a6abdb4210f /sysconfig/network-scripts/ifdown
parent1778ff74882f99d3855186634003e8fe3121c80d (diff)
downloadinitscripts-779670cae04691237a793e7a19f19fd3c2b797d3.tar
initscripts-779670cae04691237a793e7a19f19fd3c2b797d3.tar.gz
initscripts-779670cae04691237a793e7a19f19fd3c2b797d3.tar.bz2
initscripts-779670cae04691237a793e7a19f19fd3c2b797d3.tar.xz
initscripts-779670cae04691237a793e7a19f19fd3c2b797d3.zip
flush all addresses associated with a device when bringing it down, not just
the configured address. The configured address may have changed after the device was brought up, leaving around a stale address associated with the downed device.
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-xsysconfig/network-scripts/ifdown5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index c807c711..45692820 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -83,7 +83,10 @@ if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
}
else
expand_config
- ip addr del ${IPADDR}/${PREFIX} brd ${BROADCAST:-+} dev ${REALDEVICE}
+ # we can't just delete the configured address because that address
+ # may have been changed in the config file since the device was
+ # brought up. Flush all addresses instead.
+ ip addr flush dev ${DEVICE}
fi
if [ "${REALDEVICE}" = "${DEVICE}" ]; then