[master] e763385e5 Add an ipv6 bogo ip by the name bogo_ip6
Nils Goroll
nils.goroll at uplex.de
Tue Feb 9 16:27:07 UTC 2021
commit e763385e5786d3b2ff58864835162e922c25af53
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sat Mar 23 16:10:47 2019 +0100
Add an ipv6 bogo ip by the name bogo_ip6
to slim down one of my PRs with a trivial addition which, I hope, will
not be controversial.
diff --git a/include/vsa.h b/include/vsa.h
index e9fd9108a..7b7ffb55e 100644
--- a/include/vsa.h
+++ b/include/vsa.h
@@ -35,6 +35,7 @@
struct suckaddr;
extern const size_t vsa_suckaddr_len;
extern const struct suckaddr *bogo_ip;
+extern const struct suckaddr *bogo_ip6;
void VSA_Init(void);
int VSA_Sane(const struct suckaddr *);
diff --git a/lib/libvarnish/vsa.c b/lib/libvarnish/vsa.c
index 85a3e6785..57287b60d 100644
--- a/lib/libvarnish/vsa.c
+++ b/lib/libvarnish/vsa.c
@@ -183,11 +183,15 @@ const size_t vsa_suckaddr_len = sizeof(struct suckaddr);
*/
static struct suckaddr bogo_ip_vsa;
const struct suckaddr *bogo_ip = &bogo_ip_vsa;
+/* same in IPv6 */
+static struct suckaddr bogo_ip6_vsa;
+const struct suckaddr *bogo_ip6 = &bogo_ip6_vsa;
void
VSA_Init()
{
AN(VSA_BuildFAP(&bogo_ip_vsa, PF_INET, NULL, 0, NULL, 0));
+ AN(VSA_BuildFAP(&bogo_ip6_vsa, PF_INET6, NULL, 0, NULL, 0));
}
/*
More information about the varnish-commit
mailing list