[6.0] bea21ef05 Don't defer an std.ip() failure to WS_Alloc'ate
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed May 22 09:03:11 UTC 2019
commit bea21ef05a2631a071c8e20edfb7323aa1d2e62c
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Thu May 9 15:21:11 2019 +0200
Don't defer an std.ip() failure to WS_Alloc'ate
At this point the workspace already overflowed so there's no point
making further progress to fail on the next workspace operation.
Incidentally, we are failing for an IP conversion, not an integer.
Conflicts:
lib/libvmod_std/vmod_std_conversions.c
diff --git a/lib/libvmod_std/vmod_std_conversions.c b/lib/libvmod_std/vmod_std_conversions.c
index e98b98cef..49fe95e61 100644
--- a/lib/libvmod_std/vmod_std_conversions.c
+++ b/lib/libvmod_std/vmod_std_conversions.c
@@ -90,9 +90,8 @@ vmod_ip(VRT_CTX, VCL_STRING s, VCL_IP d, VCL_BOOL n)
p = WS_Alloc(ctx->ws, vsa_suckaddr_len);
if (p == NULL) {
- VSLb(ctx->vsl, SLT_VCL_Error,
- "vmod std.ip(): insufficient workspace");
- return (d);
+ VRT_fail(ctx, "std.ip: insufficient workspace");
+ return (NULL);
}
retval = VSS_ResolveOne(p, s, "80", PF_UNSPEC, SOCK_STREAM,
More information about the varnish-commit
mailing list