Skip to content
Permalink
Browse files

Extend vrt_backend with a connection prefix ptr+len

  • Loading branch information...
bsdphk committed Oct 8, 2019
1 parent ec70dbc commit bba1499f586dd7d75343d7869497d991ded2607e
Showing with 7 additions and 3 deletions.
  1. +2 −0 bin/varnishd/cache/cache_backend.c
  2. +5 −3 include/vrt.h
@@ -541,6 +541,8 @@ vrt_hash_be(const struct vrt_backend *vrt)
VSHA256_Update(cx, vrt->ipv6_suckaddr, vsa_suckaddr_len);
if (vrt->path != NULL)
VSHA256_Update(cx, vrt->path, strlen(vrt->path));
if (vrt->prefix_ptr != NULL)
VSHA256_Update(cx, vrt->prefix_ptr, vrt->prefix_len);
VSHA256_Final(ident, cx);
return (vbe64dec(ident));
}
@@ -52,7 +52,7 @@
* binary/load-time compatible, increment MAJOR version
*
* unreleased (planned for 2020-03-15)
* (nothing yet)
* New prefix_{ptr|len} fields in vrt_backend
* 10.0 (2019-09-15)
* VRT_UpperLowerStrands added.
* VRT_synth_page now takes STRANDS argument
@@ -344,7 +344,9 @@ extern const void * const vrt_magic_string_unset;
vtim_dur first_byte_timeout; \
vtim_dur between_bytes_timeout; \
unsigned max_connections; \
unsigned proxy_header;
unsigned proxy_header; \
void *prefix_ptr; \
unsigned prefix_len;

#define VRT_BACKEND_HANDLE() \
do { \
@@ -363,7 +365,7 @@ extern const void * const vrt_magic_string_unset;

struct vrt_backend {
unsigned magic;
#define VRT_BACKEND_MAGIC 0x4799ce6b
#define VRT_BACKEND_MAGIC 0x4799ce6c
VRT_BACKEND_FIELDS(const)
VCL_IP ipv4_suckaddr;
VCL_IP ipv6_suckaddr;

0 comments on commit bba1499

Please sign in to comment.
You can’t perform that action at this time.