Skip to content

Commit

Permalink
added RST acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
balrajsingh committed Jun 7, 2015
1 parent 838097c commit 827839b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tcp/segment.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 827839b

Please sign in to comment.