[master] b2075031a Don't implement VRT_* functions in libvarnish

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 24 11:26:15 UTC 2018


commit b2075031a85dbe34952eee03245261b63ea97922
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 24 06:43:17 2018 +0000

    Don't implement VRT_* functions in libvarnish

diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index af59b6a0b..9d47728c2 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -872,3 +872,9 @@ VRT_blob(VRT_CTX, const char *err, const void *src, size_t len)
 	p->priv = d;
 	return (p);
 }
+
+int
+VRT_VSA_GetPtr(const struct suckaddr *sua, const unsigned char ** dst)
+{
+	return (VSA_GetPtr(sua, dst));
+}
diff --git a/include/vsa.h b/include/vsa.h
index 70e4e502d..e5e342a26 100644
--- a/include/vsa.h
+++ b/include/vsa.h
@@ -55,4 +55,11 @@ struct suckaddr *VSA_Malloc(const void *s, unsigned  sal);
  */
 struct suckaddr *VSA_Build(void *d, const void *s, unsigned sal);
 
+/*
+ * This VRT interface is for the VCC generated ACL code, which needs
+ * to know the address family and a pointer to the actual address.
+ */
+  
+int VSA_GetPtr(const struct suckaddr *sua, const unsigned char ** dst);
+
 #endif
diff --git a/lib/libvarnish/vsa.c b/lib/libvarnish/vsa.c
index 4e0762f95..40d84fa83 100644
--- a/lib/libvarnish/vsa.c
+++ b/lib/libvarnish/vsa.c
@@ -43,7 +43,6 @@
 #include "vdef.h"
 #include "vas.h"
 #include "vsa.h"
-#include "vrt.h"
 #include "miniobj.h"
 
 /*
@@ -204,7 +203,7 @@ VSA_Init()
  */
 
 int
-VRT_VSA_GetPtr(const struct suckaddr *sua, const unsigned char ** dst)
+VSA_GetPtr(const struct suckaddr *sua, const unsigned char ** dst)
 {
 
 	AN(dst);


More information about the varnish-commit mailing list