when nginx use setsockopt ON_LINGER, the seq number of the RST packet is error.

Use tcpdump to capture packets and you will find the problem.
See:https://reviews.freebsd.org/D30036.
This commit is contained in:
wenchengji 2023-01-09 06:51:16 +00:00
parent 3c7b637d18
commit 0f015b3f5d
2 changed files with 0 additions and 18 deletions

View File

@ -13489,15 +13489,6 @@ send:
th->th_seq = htonl(tp->snd_max);
bbr_seq = tp->snd_max;
}
} else if (flags & TH_RST) {
/*
* For a Reset send the last cum ack in sequence
* (this like any other choice may still generate a
* challenge ack, if a ack-update packet is in
* flight).
*/
th->th_seq = htonl(tp->snd_una);
bbr_seq = tp->snd_una;
} else {
/*
* len == 0 and not persist we use snd_max, sending

View File

@ -13487,15 +13487,6 @@ send:
rack->rc_in_persist) {
th->th_seq = htonl(tp->snd_nxt);
rack_seq = tp->snd_nxt;
} else if (flags & TH_RST) {
/*
* For a Reset send the last cum ack in sequence
* (this like any other choice may still generate a
* challenge ack, if a ack-update packet is in
* flight).
*/
th->th_seq = htonl(tp->snd_una);
rack_seq = tp->snd_una;
} else {
th->th_seq = htonl(tp->snd_max);
rack_seq = tp->snd_max;