From 80acca2c91c9053c799365bae918db7ed8bdc56f Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 10 Nov 2010 14:45:43 +1100 Subject: [PATCH] this stuff is just so fragile that it will enter infinite recovery and fail loops on any kind of tiny unexpected error unconditionally try to remove ip addresses from both old and new interface before trying to add it to the new interface to make it less fragile --- config/events.d/10.interface | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/config/events.d/10.interface b/config/events.d/10.interface index 5b31fb81..640d3dba 100755 --- a/config/events.d/10.interface +++ b/config/events.d/10.interface @@ -244,11 +244,8 @@ case "$1" in iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null iptables -I INPUT -i $oiface -d $ip -j DROP - delete_ip_from_iface $oiface $ip $maskbits || { - delete_ip_from_iface $niface $ip $maskbits - iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null - exit 1; - } + delete_ip_from_iface $oiface $ip $maskbits 2>/dev/null + delete_ip_from_iface $niface $ip $maskbits 2>/dev/null add_ip_to_iface $niface $ip $maskbits || { iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null -- 2.34.1