1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ensure we use killtcp on non-NFS/non-CIFS ports for faster failover of

other protocols

(This used to be ctdb commit 09aa91224fe7b835dc0a2c58868cce28ce54809f)
This commit is contained in:
Andrew Tridgell 2008-08-01 14:17:50 +10:00 committed by Ronnie Sahlberg
parent bf32a8e6c3
commit eaaa6e7774

View File

@ -229,8 +229,16 @@ kill_tcp_connections() {
srcport=`echo $src | cut -d: -f2`
destip=`echo $dest | cut -d: -f1`
destport=`echo $dest | cut -d: -f2`
ctdb killtcp $srcip:$srcport $destip:$destport >/dev/null 2>&1 || _failed=1
echo "Killing TCP connection $srcip:$srcport $destip:$destport"
ctdb killtcp $srcip:$srcport $destip:$destport >/dev/null 2>&1 || _failed=1
case $destport in
# we only do one-way killtcp for NFS and CIFS
139|445|2049) : ;;
# for all others we do 2-way
*)
ctdb killtcp $destip:$destport $srcip:$srcport >/dev/null 2>&1 || _failed=1
;;
esac
_killcount=`expr $_killcount + 1`
done < $connfile
/bin/rm -f $connfile