1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +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:
Martin Schwenke 2016-03-11 15:27:10 +11:00 committed by Amitay Isaacs
parent 1924323af6
commit b417d79930
3 changed files with 7 additions and 5 deletions

View File

@ -161,7 +161,7 @@ case "$1" in
# we do an extra delete to cope with the script being killed # 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 -D INPUT -i $iface -d $ip -j DROP 2> /dev/null
iptables_wrapper $family -I INPUT -i $iface -d $ip -j DROP 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 || { delete_ip_from_iface $iface $ip $maskbits || {
iptables_wrapper $family \ iptables_wrapper $family \

View File

@ -44,7 +44,8 @@ case "$1" in
# kill off any tcp connections # kill off any tcp connections
ipvsadm -D -t $CTDB_LVS_PUBLIC_IP:0 ipvsadm -D -t $CTDB_LVS_PUBLIC_IP:0
ipvsadm -D -u $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 ctdb_get_pnn
LVSMASTER=`ctdb lvsmaster | sed -e "s/.*Node //" -e "s/ .*//"` LVSMASTER=`ctdb lvsmaster | sed -e "s/.*Node //" -e "s/ .*//"`

View File

@ -430,10 +430,11 @@ ctdb_check_command ()
################################################ ################################################
kill_tcp_connections () kill_tcp_connections ()
{ {
_ip="$1" _iface="$1"
_ip="$2"
_oneway=false _oneway=false
if [ "$2" = "oneway" ] ; then if [ "$3" = "oneway" ] ; then
_oneway=true _oneway=true
fi fi
@ -494,7 +495,7 @@ kill_tcp_connections ()
################################################################## ##################################################################
kill_tcp_connections_local_only () kill_tcp_connections_local_only ()
{ {
kill_tcp_connections "$1" "oneway" kill_tcp_connections "$@" "oneway"
} }
################################################################## ##################################################################