[master] c9b29b623 vcc_acl: Also test the other "folding gone wrong" case

Nils Goroll nils.goroll at uplex.de
Mon Jul 21 13:06:05 UTC 2025


commit c9b29b623b7f3d4d3b33499e68d17e61429b34dc
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Jul 21 09:40:47 2025 +0200

    vcc_acl: Also test the other "folding gone wrong" case
    
    The previous example was for a mask expansion, but the case also exists for
    supersedes.

diff --git a/bin/varnishtest/tests/r04369.vtc b/bin/varnishtest/tests/r04369.vtc
index 5c42d575d..80a84f0b0 100644
--- a/bin/varnishtest/tests/r04369.vtc
+++ b/bin/varnishtest/tests/r04369.vtc
@@ -9,6 +9,10 @@ varnish v1 -vcl+backend {
 		! "10.0.0.0"/23;
 		"10.0.3.0"/24;
 		"10.0.2.0"/23;
+
+		! "10.1.0.0"/23;
+		"10.1.3.0"/24;
+		"10.1.0.0"/22;
 	}
 	sub vcl_recv {
 		return (synth(200));
@@ -18,12 +22,15 @@ varnish v1 -vcl+backend {
 	}
 	sub vcl_synth {
 		set req.http.ip = "10.0.2.42";	call t;
+		set req.http.ip = "10.1.0.42";	call t;
 	}
 } -start
 
 logexpect l1 -v v1 -g raw {
 	expect * 1001	ReqHeader	{^\Qip: 10.0.2.42\E$}
 	expect 0 =	VCL_acl	{^\QMATCH acl1 "10.0.2.0"/23\E$}
+	expect 1 =	ReqHeader	{^\Qip: 10.1.0.42\E$}
+	expect 0 =	VCL_acl	{^\QNEG_MATCH acl1 "10.1.0.0"/23\E$}
 } -start
 
 client c1 {


More information about the varnish-commit mailing list