mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ctdb-scripts: Add interface argument to kill_tcp_connections()
This will be needed for a rewrite of the connection killing code but it is not used yet. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
1924323af6
commit
b417d79930
@ -161,7 +161,7 @@ case "$1" in
|
||||
# we do an extra delete to cope with the script being killed
|
||||
iptables_wrapper $family -D INPUT -i $iface -d $ip -j DROP 2> /dev/null
|
||||
iptables_wrapper $family -I INPUT -i $iface -d $ip -j DROP
|
||||
kill_tcp_connections $ip
|
||||
kill_tcp_connections "$iface" "$ip"
|
||||
|
||||
delete_ip_from_iface $iface $ip $maskbits || {
|
||||
iptables_wrapper $family \
|
||||
|
@ -44,7 +44,8 @@ case "$1" in
|
||||
# kill off any tcp connections
|
||||
ipvsadm -D -t $CTDB_LVS_PUBLIC_IP:0
|
||||
ipvsadm -D -u $CTDB_LVS_PUBLIC_IP:0
|
||||
kill_tcp_connections_local_only $CTDB_LVS_PUBLIC_IP
|
||||
kill_tcp_connections_local_only \
|
||||
"$CTDB_PUBLIC_INTERFACE" "$CTDB_LVS_PUBLIC_IP"
|
||||
|
||||
ctdb_get_pnn
|
||||
LVSMASTER=`ctdb lvsmaster | sed -e "s/.*Node //" -e "s/ .*//"`
|
||||
|
@ -430,10 +430,11 @@ ctdb_check_command ()
|
||||
################################################
|
||||
kill_tcp_connections ()
|
||||
{
|
||||
_ip="$1"
|
||||
_iface="$1"
|
||||
_ip="$2"
|
||||
|
||||
_oneway=false
|
||||
if [ "$2" = "oneway" ] ; then
|
||||
if [ "$3" = "oneway" ] ; then
|
||||
_oneway=true
|
||||
fi
|
||||
|
||||
@ -494,7 +495,7 @@ kill_tcp_connections ()
|
||||
##################################################################
|
||||
kill_tcp_connections_local_only ()
|
||||
{
|
||||
kill_tcp_connections "$1" "oneway"
|
||||
kill_tcp_connections "$@" "oneway"
|
||||
}
|
||||
|
||||
##################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user