[master] 90e87e3 Assert that literal vxids we parse never have the client/server bit set

Nils Goroll nils.goroll at uplex.de
Tue Jul 14 17:07:06 CEST 2015


commit 90e87e30fb92e525016ce1975fa61ad744bdc41d
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Jul 14 17:05:52 2015 +0200

    Assert that literal vxids we parse never have the client/server bit set
    
    This is an additional safeguard against regressions of #1762

diff --git a/lib/libvarnishapi/vsl_dispatch.c b/lib/libvarnishapi/vsl_dispatch.c
index 459d0b7..bc108f4 100644
--- a/lib/libvarnishapi/vsl_dispatch.c
+++ b/lib/libvarnishapi/vsl_dispatch.c
@@ -700,6 +700,7 @@ vtx_parse_link(const char *str, enum VSL_transaction_e *ptype,
 		*ptype = VSL_t_unknown;
 	if (i == 1)
 		return (1);
+	assert((vxid & ~VSL_IDENTMASK) == 0);
 	*pvxid = vxid;
 	if (i == 2)
 		return (2);



More information about the varnish-commit mailing list