ctdb-killtcp: Filter out sent packets
authorMartin Schwenke <martin@meltin.net>
Mon, 21 Mar 2016 00:11:19 +0000 (11:11 +1100)
committerAmitay Isaacs <amitay@samba.org>
Fri, 1 Apr 2016 02:42:12 +0000 (04:42 +0200)
commit7e5eab139d37819e162188dd474e5d142f3c04c1
tree56d94fadbc4a275ad057ef6ba9889cf9de636321
parentbba31152df279ebf6afa6555544a990d64dbe4b1
ctdb-killtcp: Filter out sent packets

When previously killing TCP connections via the daemon there was some
latency due to each kill being sent to the daemon via a separate
control.  This probably meant that when doing a 2-way kill the tickle
ACKs sent to the client end of a connection would not interfere with
listening for the reply ACK from the server end.  Now that there is no
latency, the tickle ACK or RST sent to the client end can be seen as
the reply to the server end tickle ACK, and vice-versa.

To avoid this, throw away packets that look like we sent them.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tools/ctdb_killtcp.c