Skip to contentSkip to conversation

tcpsession: send ACK after second FIN/ACK

PATCH New Max Kellermann 1 participant 1 message Sep 22, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcpsession: send ACK after second FIN/ACK

Hi,

the "tcpsession CLOSE" command misses the final "ACK" packet, this patch implements it. Without it, netfilter will not clean up its conntrack tables correctly after the TCP connection is closed.

Max

Thu Sep 15 00:03:36 CEST 2005 [email protected]
* send ACK after second FIN/ACK

tools/tcpsession.c +4 -0
diff -rN -u old-nfsim-0/tools/tcpsession.c new-nfsim-0/tools/tcpsession.c
@@ -239,6 +239,10 @@
 	out->ack++;
 	if (!tcp_send(out, in, 0, "FIN/ACK", NULL, 0, NULL))
 		return false;
+	out->seq++;
+	in->ack++;
+	if (!tcp_send(in, out, 0, "ACK", NULL, 0, NULL))
+		return false;
 	talloc_free(curr);
 	curr = NULL;
 	return true;