Commit ce47e75d authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

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.
parent ea3c109c
......@@ -202,8 +202,7 @@ vmod_ip(VRT_CTX, struct VARGS(ip) *a)
p = WS_Alloc(ctx->ws, vsa_suckaddr_len);
if (p == NULL) {
VSLb(ctx->vsl, SLT_VCL_Error,
"vmod std.ip(): insufficient workspace");
VRT_fail(ctx, "std.ip: insufficient workspace");
return (NULL);
}
......@@ -217,7 +216,7 @@ vmod_ip(VRT_CTX, struct VARGS(ip) *a)
if (a->valid_fallback)
return (a->fallback);
VRT_fail(ctx, "std.integer: conversion failed");
VRT_fail(ctx, "std.ip: conversion failed");
return (NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment