From: Ronnie Sahlberg Date: Thu, 18 Oct 2007 04:13:48 +0000 (+1000) Subject: flush the route cache when we have added the single public ip to the X-Git-Tag: tevent-0.9.20~348^2~2373^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4ec6e9d6b7ff7bfcabdba6825bb650e80652f40;p=thirdparty%2Fsamba.git flush the route cache when we have added the single public ip to the node cleanup and remove everything when we do a shutdown event (This used to be ctdb commit 221432f45073bc7624803058c8bbf18838e7ceeb) --- diff --git a/ctdb/config/events.d/90.ipmux b/ctdb/config/events.d/90.ipmux index 0ffefc4745f..253d8e746b1 100755 --- a/ctdb/config/events.d/90.ipmux +++ b/ctdb/config/events.d/90.ipmux @@ -22,6 +22,17 @@ case $cmd in ;; shutdown) + # remove the ip + ip addr del $CTDB_SINGLE_PUBLIC_IP/32 dev lo >/dev/null 2>/dev/null + + # remove any iptables rules + /sbin/iptables -D INPUT -i $CTDB_PUBLIC_INTERFACE -d $CTDB_SINGLE_PUBLIC_IP -j DROP 2> /dev/null + + # kill off any ipmux processes + killall -9 ctdb_ipmux >/dev/null 2>/dev/null + + # flush our route cache + echo 1 > /proc/sys/net/ipv4/route/flush ;; takeip) @@ -63,6 +74,9 @@ case $cmd in iptables -I INPUT 1 -d $CTDB_SINGLE_PUBLIC_IP -i $CTDB_PUBLIC_INTERFACE -j QUEUE >/dev/null 2>/dev/null ctdb_ipmux & + + # flush our route cache + echo 1 > /proc/sys/net/ipv4/route/flush ;; monitor)