From 827839b7b4265a8ed1ce869efea6293fd17bd1ab Mon Sep 17 00:00:00 2001 From: Balraj Singh Date: Sun, 7 Jun 2015 18:37:29 +0100 Subject: [PATCH] added RST acceptance test --- tcp/segment.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcp/segment.ml b/tcp/segment.ml index b16333eff..ce148bb81 100644 --- a/tcp/segment.ml +++ b/tcp/segment.ml @@ -105,8 +105,8 @@ module Rx(Time:V1_LWT.TIME) = struct let input (q:t) seg = (* Check that the segment fits into the valid receive window *) let force_ack = ref false in - (* URG_TODO also check that this is a valid RST i.e. the seq/ack numbers are in the window *) - if (seg.rst) then begin + (* TODO check that this test for a valid RST is valid *) + if (seg.rst && (Window.valid q.wnd seg.sequence)) then begin StateTick.tick q.state State.Recv_rst; (* Dump all the received but out of order frames *) q.segs <- S.empty;