Skip to content
Permalink
Browse files

turn return(vcl(...)) ito a noop for req.restarts > 0

As the FSM will fail for this case, we should not run the code in the
first place.
  • Loading branch information...
nigoroll committed Nov 13, 2019
1 parent 2eb352d commit 2d4c2a50e835a3d2d1b1e2cfb1a89bc1b0602c62
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/varnishd/cache/cache_vpi.c
@@ -93,7 +93,7 @@ VPI_vcl_select(VRT_CTX, VCL_VCL vcl)
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_NOTNULL(req->top, REQTOP_MAGIC);

if (IS_TOPREQ(req) && req->top->vcl0 != NULL)
if ((IS_TOPREQ(req) && req->top->vcl0 != NULL) || req->restarts > 0)
return; // Illegal, req-FSM will fail this later.

/* XXX VCL_Task* are somewhat duplicated to those in Req_Rollback called

0 comments on commit 2d4c2a5

Please sign in to comment.
You can’t perform that action at this time.