[master] 9e07b94 Add a new VRT_acl_match function to the VMODs ABI
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Feb 24 15:27:04 CET 2016
commit 9e07b94744a883dc0d0c6fc58b364cbe6f61e0ba
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Feb 23 18:26:08 2016 +0100
Add a new VRT_acl_match function to the VMODs ABI
VRT_MINOR_VERSION needs to be incremented for the 4.1 branch.
diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index 2bb697c..a82b1e4 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -39,6 +39,7 @@
#include "vcl.h"
#include "vrt.h"
#include "vrt_obj.h"
+#include "vsa.h"
#include "vtcp.h"
#include "vtim.h"
@@ -74,6 +75,16 @@ VRT_acl_log(VRT_CTX, const char *msg)
VSL(SLT_VCL_acl, 0, "%s", msg);
}
+int
+VRT_acl_match(VRT_CTX, VCL_ACL acl, VCL_IP ip)
+{
+
+ CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
+ CHECK_OBJ_NOTNULL(acl, VRT_ACL_MAGIC);
+ assert(VSA_Sane(ip));
+ return (acl->match(ctx, ip));
+}
+
/*--------------------------------------------------------------------*/
struct http *
diff --git a/include/vrt.h b/include/vrt.h
index ccebea0..ae30ee4 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -251,6 +251,7 @@ struct vrt_acl {
};
void VRT_acl_log(VRT_CTX, const char *msg);
+int VRT_acl_match(VRT_CTX, VCL_ACL, VCL_IP);
/* req related */
More information about the varnish-commit
mailing list