Skip to content

Commit 7784fd8

Browse files
Small fix in js challenge
According to our wiki: "When Tempesta FW receives the redirected request it ensures that it is received not earlier than delay_min". So we should compare time using `time_after_eq` not `time_after`. This is improtant for our tests because loopback interface is very fast and some tests can be flaky.
1 parent 3ce4c20 commit 7784fd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fw/http_sess.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ tfw_http_sess_check_jsch(StickyVal *sv, TfwHttpReq* req)
677677
*/
678678
min_time = sv->ts + js_ch->delay_min
679679
+ msecs_to_jiffies(sv->ts % js_ch->delay_range);
680-
if (time_after(req->jrxtstamp, min_time))
680+
if (time_after_eq(req->jrxtstamp, min_time))
681681
return 0;
682682

683683
sess_warn("jsch redirect received too early",

0 commit comments

Comments
 (0)