mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-04 06:23:04 +00:00
Small TCP protocol fix
This commit is contained in:
parent
05aa4f3c7e
commit
e05a628b14
1 changed files with 1 additions and 1 deletions
|
@ -807,7 +807,7 @@ jboolean handle_tcp(const struct arguments *args,
|
||||||
memset(&rst, 0, sizeof(struct tcp_session));
|
memset(&rst, 0, sizeof(struct tcp_session));
|
||||||
rst.version = 4;
|
rst.version = 4;
|
||||||
rst.local_seq = ntohl(tcphdr->ack_seq);
|
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) {
|
if (version == 4) {
|
||||||
rst.saddr.ip4 = (__be32) ip4->saddr;
|
rst.saddr.ip4 = (__be32) ip4->saddr;
|
||||||
|
|
Loading…
Reference in a new issue