[master] f74235ab2 Signed/unsigned polish

Poul-Henning Kamp phk at FreeBSD.org
Thu Apr 18 13:13:08 UTC 2019


commit f74235ab21fab06035ff36be72a063bbd1b38bdd
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Apr 18 12:46:59 2019 +0000

    Signed/unsigned polish

diff --git a/bin/varnishtest/tests/v00017.vtc b/bin/varnishtest/tests/v00017.vtc
index d3a0ccf7a..2809b2fe1 100644
--- a/bin/varnishtest/tests/v00017.vtc
+++ b/bin/varnishtest/tests/v00017.vtc
@@ -1,12 +1,12 @@
 varnishtest "VCL compiler coverage test: vcc_acl.c"
 
-varnish v1 -errvcl {Too wide mask (33) for IPv4 address} {
+varnish v1 -errvcl {Too wide mask (/33) for IPv4 address} {
 	backend b { .host = "127.0.0.1"; }
 	acl a { "10.1.2.3"/33; }
 	sub vcl_recv { if (client.ip ~ a) { return(pass); } }
 }
 
-varnish v1 -errvcl {Too wide mask (129) for IPv6 address} {
+varnish v1 -errvcl {Too wide mask (/129) for IPv6 address} {
 	backend b { .host = "127.0.0.1"; }
 	acl a { "1::2"/129; }
 	sub vcl_recv { if (client.ip ~ a) { return(pass); } }
diff --git a/lib/libvcc/vcc_acl.c b/lib/libvcc/vcc_acl.c
index 06d16ee6f..d038e1a3e 100644
--- a/lib/libvcc/vcc_acl.c
+++ b/lib/libvcc/vcc_acl.c
@@ -99,7 +99,7 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l,
 
 	if (fam == PF_INET && ae->mask > 32) {
 		VSB_printf(tl->sb,
-		    "Too wide mask (%u) for IPv4 address\n", ae->mask);
+		    "Too wide mask (/%d) for IPv4 address\n", ae->mask);
 		if (ae->t_mask != NULL)
 			vcc_ErrWhere(tl, ae->t_mask);
 		else
@@ -108,7 +108,7 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l,
 	}
 	if (fam == PF_INET6 && ae->mask > 128) {
 		VSB_printf(tl->sb,
-		    "Too wide mask (%u) for IPv6 address\n", ae->mask);
+		    "Too wide mask (/%d) for IPv6 address\n", ae->mask);
 		vcc_ErrWhere(tl, ae->t_mask);
 		return;
 	}
@@ -231,7 +231,7 @@ vcc_acl_try_getaddrinfo(struct vcc *tl, struct acl_e *ae)
 
 	if (ae->t_mask != NULL && i4 > 0 && i6 > 0) {
 		VSB_printf(tl->sb,
-		    "Mask (%u) specified, but string resolves to"
+		    "Mask (/%d) specified, but string resolves to"
 		    " both IPv4 and IPv6 addresses.\n", ae->mask);
 		vcc_ErrWhere(tl, ae->t_mask);
 		return;


More information about the varnish-commit mailing list