[4.1] fd95845 Fix test for duplicate links in vsl_dispatch
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Tue Oct 11 17:17:05 CEST 2016
commit fd958451b81a8edc092e538ca947b1fea04cc81a
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Fri Sep 30 15:21:13 2016 +0200
Fix test for duplicate links in vsl_dispatch
This test wasn't working as it was supposed to, and would cause the
forward links graph building of log transactions to fail. The fail was
soft, as the reverse mapping still succeeded creating the right
mapping.
Depending on when the local thread log buffer was flushed, the problem
would show as spurious "duplicate link" log records to be inserted.
Fixes: #1830
diff --git a/lib/libvarnishapi/vsl_dispatch.c b/lib/libvarnishapi/vsl_dispatch.c
index bbcd7cc..7b733ad 100644
--- a/lib/libvarnishapi/vsl_dispatch.c
+++ b/lib/libvarnishapi/vsl_dispatch.c
@@ -834,7 +834,7 @@ vtx_scan_link(struct VSLQ *vslq, struct vtx *vtx, const uint32_t *ptr)
if (c_vtx->parent == vtx)
/* Link already exists */
return (0);
- if (c_vtx->parent != vtx)
+ if (c_vtx->parent != NULL && c_vtx->parent != vtx)
return (vtx_diag_tag(vtx, ptr, "duplicate link"));
if (c_vtx->flags & VTX_F_COMPLETE)
return (vtx_diag_tag(vtx, ptr, "link too late"));
More information about the varnish-commit
mailing list