[master] c878d750f Move the layout of compiled ACLs to VPI space

Poul-Henning Kamp phk at FreeBSD.org
Mon Jun 3 13:01:09 UTC 2019


commit c878d750fa31310e71df7b1590e60e9148545ee0
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jun 3 12:05:47 2019 +0000

    Move the layout of compiled ACLs to VPI space

diff --git a/include/vcc_interface.h b/include/vcc_interface.h
index 347c20077..10df9d49a 100644
--- a/include/vcc_interface.h
+++ b/include/vcc_interface.h
@@ -55,3 +55,11 @@ int VPI_Vmod_Init(VRT_CTX, struct vmod **hdl, unsigned nbr, void *ptr, int len,
     const char *nm, const char *path, const char *file_id, const char *backup);
 void VPI_Vmod_Unload(VRT_CTX, struct vmod **hdl);
 
+typedef int acl_match_f(VRT_CTX, const VCL_IP);
+
+struct vrt_acl {
+	unsigned        magic;
+#define VRT_ACL_MAGIC   0x78329d96
+	acl_match_f     *match;
+};
+
diff --git a/include/vrt.h b/include/vrt.h
index 7a227ebc9..4cb78e002 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -387,14 +387,6 @@ struct vrt_backend_probe {
  * Implementation details of ACLs
  */
 
-typedef int acl_match_f(VRT_CTX, const VCL_IP);
-
-struct vrt_acl {
-	unsigned	magic;
-#define VRT_ACL_MAGIC	0x78329d96
-	acl_match_f	*match;
-};
-
 void VRT_acl_log(VRT_CTX, const char *);
 int VRT_acl_match(VRT_CTX, VCL_ACL, VCL_IP);
 
diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index 9e1463101..8ded76669 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -513,7 +513,7 @@ xyzzy_match_acl(VRT_CTX, VCL_ACL acl, VCL_IP ip)
 {
 
 	CHECK_OBJ_ORNULL(ctx, VRT_CTX_MAGIC);
-	CHECK_OBJ_ORNULL(acl, VRT_ACL_MAGIC);
+	AN(acl);
 	assert(VSA_Sane(ip));
 
 	return (VRT_acl_match(ctx, acl, ip));


More information about the varnish-commit mailing list