From 779670cae04691237a793e7a19f19fd3c2b797d3 Mon Sep 17 00:00:00 2001 From: Preston Brown Date: Tue, 25 Sep 2001 18:24:28 +0000 Subject: 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. --- sysconfig/network-scripts/ifdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sysconfig/network-scripts') 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 -- cgit v1.2.1