mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Adding test case for RST acceptable ack panic
PiperOrigin-RevId: 197795613 Change-Id: I759dd04995d900cba6b984649fa48bbc880946d6
This commit is contained in:
@@ -400,7 +400,20 @@ func TestRstOnCloseWithUnreadData(t *testing.T) {
|
||||
checker.TCP(
|
||||
checker.DstPort(context.TestPort),
|
||||
checker.TCPFlags(header.TCPFlagAck|header.TCPFlagRst),
|
||||
// We shouldn't consume a sequence number on RST.
|
||||
checker.SeqNum(uint32(c.IRS)+1),
|
||||
))
|
||||
|
||||
// This final should be ignored because an ACK on a reset doesn't
|
||||
// mean anything.
|
||||
c.SendPacket(nil, &context.Headers{
|
||||
SrcPort: context.TestPort,
|
||||
DstPort: c.Port,
|
||||
Flags: header.TCPFlagAck,
|
||||
SeqNum: seqnum.Value(790 + len(data)),
|
||||
AckNum: c.IRS.Add(seqnum.Size(2)),
|
||||
RcvWnd: 30000,
|
||||
})
|
||||
}
|
||||
|
||||
func TestFullWindowReceive(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user