git: regression: Add TCP RST receive window test
Aaron LI
aly at crater.dragonflybsd.org
Sat Sep 12 04:06:29 PDT 2026
commit fb6100522666ed3dedf0c4c11b1d7274597cd99d
Author: Thomas Grainger <tagrain at gmail.com>
Date: Wed Jul 8 16:22:20 2026 +0100
regression: Add TCP RST receive window test
Note: root is required it it uses BPF to observe the client's final data
segment and a raw IPv4 socket to inject the RST at exactly RCV.NXT.
Before the fix in the last commit:
```
$ ./rst_rcvnxt_window_drop
net.inet.tcp.rfc1323: 1 -> 0
net.inet.tcp.delayed_ack: 1 -> 1
net.inet.tcp.recvbuf_auto: 1 -> 0
FAIL: connection still ESTABLISHED (RST at rcv_nxt was dropped), expected ECONNRESET
net.inet.tcp.rfc1323: 0 -> 1
net.inet.tcp.delayed_ack: 1 -> 1
net.inet.tcp.recvbuf_auto: 0 -> 1
```
After the fix:
```
$ ./rst_rcvnxt_window_drop
net.inet.tcp.rfc1323: 1 -> 0
net.inet.tcp.delayed_ack: 1 -> 1
net.inet.tcp.recvbuf_auto: 1 -> 0
PASS
net.inet.tcp.rfc1323: 0 -> 1
net.inet.tcp.delayed_ack: 1 -> 1
net.inet.tcp.recvbuf_auto: 0 -> 1
```
Bug: https://bugs.dragonflybsd.org/issues/3418
GitHub-PR: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/48
Summary of changes:
.../sockets/rst_rcvnxt_window_drop/Makefile | 5 +
.../rst_rcvnxt_window_drop.c | 491 +++++++++++++++++++++
2 files changed, 496 insertions(+)
create mode 100644 tools/regression/sockets/rst_rcvnxt_window_drop/Makefile
create mode 100644 tools/regression/sockets/rst_rcvnxt_window_drop/rst_rcvnxt_window_drop.c
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fb6100522666ed3dedf0c4c11b1d7274597cd99d
--
DragonFly BSD source repository
More information about the Commits
mailing list