[master] f44b0c31f Retire preformatted backend addresses, TcpPool provides those in case of panic.
Poul-Henning Kamp
phk at FreeBSD.org
Tue Jan 5 11:39:07 UTC 2021
commit f44b0c31feae53e8e00829a36daa37af0d640af5
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Jan 5 11:37:05 2021 +0000
Retire preformatted backend addresses, TcpPool provides those in case of panic.
diff --git a/include/vrt.h b/include/vrt.h
index 6f8b8cb52..8f17e2014 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -395,9 +395,6 @@ struct vrt_endpoint {
#define VRT_BACKEND_FIELDS(rigid) \
rigid char *vcl_name; \
- rigid char *ipv4_addr; \
- rigid char *ipv6_addr; \
- rigid char *port; \
rigid char *hosthdr; \
vtim_dur connect_timeout; \
vtim_dur first_byte_timeout; \
@@ -408,9 +405,6 @@ struct vrt_endpoint {
#define VRT_BACKEND_HANDLE() \
do { \
DA(vcl_name); \
- DA(ipv4_addr); \
- DA(ipv6_addr); \
- DA(port); \
DA(hosthdr); \
DN(connect_timeout); \
DN(first_byte_timeout); \
diff --git a/lib/libvcc/vcc_backend.c b/lib/libvcc/vcc_backend.c
index a31cb901e..c6028deea 100644
--- a/lib/libvcc/vcc_backend.c
+++ b/lib/libvcc/vcc_backend.c
@@ -77,15 +77,12 @@ Emit_Sockaddr(struct vcc *tl, struct vsb *vsb1, const struct token *t_host,
VSB_printf(vsb1,
"\t.ipv4 = (const struct suckaddr *)%s,\n",
ipv4);
- Fb(tl, 0, "\t.ipv4_addr = \"%s\",\n", ipv4a);
}
if (ipv6 != NULL) {
VSB_printf(vsb1,
"\t.ipv6 = (const struct suckaddr *)%s,\n",
ipv6);
- Fb(tl, 0, "\t.ipv6_addr = \"%s\",\n", ipv6a);
}
- Fb(tl, 0, "\t.port = \"%s\",\n", pa);
VSB_printf(vsb1, "\t.uds_path = (void *) 0,\n");
}
diff --git a/lib/libvmod_debug/vmod_debug_dyn.c b/lib/libvmod_debug/vmod_debug_dyn.c
index 68739f641..8ab467085 100644
--- a/lib/libvmod_debug/vmod_debug_dyn.c
+++ b/lib/libvmod_debug/vmod_debug_dyn.c
@@ -75,20 +75,17 @@ dyn_dir_init(VRT_CTX, struct xyzzy_debug_dyn *dyn,
INIT_OBJ(&vep, VRT_ENDPOINT_MAGIC);
INIT_OBJ(&vrt, VRT_BACKEND_MAGIC);
vrt.endpoint = &vep;
- vrt.port = port;
vrt.vcl_name = dyn->vcl_name;
vrt.hosthdr = addr;
vrt.probe = probe;
sa = VSS_ResolveOne(NULL, addr, port, AF_UNSPEC, SOCK_STREAM, 0);
AN(sa);
- if (VSA_Get_Proto(sa) == AF_INET) {
- vrt.ipv4_addr = addr;
+ if (VSA_Get_Proto(sa) == AF_INET)
vep.ipv4 = sa;
- } else if (VSA_Get_Proto(sa) == AF_INET6) {
- vrt.ipv6_addr = addr;
+ else if (VSA_Get_Proto(sa) == AF_INET6)
vep.ipv6 = sa;
- } else
+ else
WRONG("Wrong proto family");
dir = VRT_new_backend(ctx, &vrt);
More information about the varnish-commit
mailing list