Commit 8795c23e authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Prevent a segmentation fault in VBE_AddBackend

parent f4cea8e1
......@@ -192,6 +192,10 @@ VBE_AddBackend(struct cli *cli, const struct vrt_backend *vb)
CHECK_OBJ_NOTNULL(b, BACKEND_MAGIC);
if (strcmp(b->vcl_name, vb->vcl_name))
continue;
if ((vb->ipv4_suckaddr != NULL) ^ (b->ipv4 != NULL))
continue;
if ((vb->ipv6_suckaddr != NULL) ^ (b->ipv6 != NULL))
continue;
if (vb->ipv4_suckaddr != NULL &&
VSA_Compare(b->ipv4, vb->ipv4_suckaddr))
continue;
......
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