Small TCP protocol fix

This commit is contained in:
M66B 2017-03-11 17:28:59 +01:00
parent 05aa4f3c7e
commit e05a628b14
1 changed files with 1 additions and 1 deletions

View File

@ -807,7 +807,7 @@ jboolean handle_tcp(const struct arguments *args,
memset(&rst, 0, sizeof(struct tcp_session));
rst.version = 4;
rst.local_seq = ntohl(tcphdr->ack_seq);
rst.remote_seq = ntohl(tcphdr->seq) + datalen + (tcphdr->fin ? 1 : 0);
rst.remote_seq = ntohl(tcphdr->seq) + datalen + (tcphdr->syn || tcphdr->fin ? 1 : 0);
if (version == 4) {
rst.saddr.ip4 = (__be32) ip4->saddr;