[master] f28cafe Keep the storage.*.* symbols around for vcl4.1

Poul-Henning Kamp phk at FreeBSD.org
Mon Mar 5 20:41:10 UTC 2018


commit f28cafe8eea6861fb4827d9a7f76917620695712
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Mar 5 20:38:52 2018 +0000

    Keep the storage.*.* symbols around for vcl4.1
    
    Properly implementing vmod_storage requires the VMOD to
    sanction symbols at VCC compile time, and I'd rather not
    face that right now.
    
    Fixes #2596

diff --git a/bin/varnishtest/tests/c00078.vtc b/bin/varnishtest/tests/c00078.vtc
index 9f14a77..898d27e 100644
--- a/bin/varnishtest/tests/c00078.vtc
+++ b/bin/varnishtest/tests/c00078.vtc
@@ -9,7 +9,7 @@ varnish v1 \
     -arg "-ss1=default,1m" \
     -arg "-ss2=default,1m" \
     -arg "-ss0=default,1m" \
-    -syntax 4.0 \
+    -syntax 4.1 \
     -vcl+backend {
 	import vtc;
 	sub vcl_backend_response {
diff --git a/lib/libvcc/vcc_storage.c b/lib/libvcc/vcc_storage.c
index a979708..aa83a32 100644
--- a/lib/libvcc/vcc_storage.c
+++ b/lib/libvcc/vcc_storage.c
@@ -84,7 +84,7 @@ vcc_stevedore(struct vcc *vcc, const char *stv_name)
 
 	CHECK_OBJ_NOTNULL(vcc, VCC_MAGIC);
 	bprintf(buf, "storage.%s", stv_name);
-	sym = VCC_MkSym(vcc, buf, SYM_VAR, VCL_LOW, VCL_40);
+	sym = VCC_MkSym(vcc, buf, SYM_VAR, VCL_LOW, VCL_41);
 	AN(sym);
 	sym->type = STEVEDORE;
 	sym->eval = vcc_Eval_Var;
@@ -94,7 +94,7 @@ vcc_stevedore(struct vcc *vcc, const char *stv_name)
 
 	for (sv = stvars; sv->name != NULL; sv++) {
 		bprintf(buf, "storage.%s.%s", stv_name, sv->name);
-		sym = VCC_MkSym(vcc, buf, SYM_VAR, VCL_LOW, VCL_40);
+		sym = VCC_MkSym(vcc, buf, SYM_VAR, VCL_LOW, VCL_41);
 		AN(sym);
 		sym->type = sv->type;
 		sym->eval = vcc_Eval_Var;


More information about the varnish-commit mailing list