]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP6: Abort in test mode when an error is returned by server.
authorRoy Marples <roy@marples.name>
Wed, 25 Nov 2020 15:14:11 +0000 (15:14 +0000)
committerRoy Marples <roy@marples.name>
Wed, 25 Nov 2020 15:14:11 +0000 (15:14 +0000)
src/dhcp6.c

index ec6d7738005d9d8848ebe0621fea008bfc631178..4dcdcaabdd38308a738ebf951a9cf85d6b1e6fa5 100644 (file)
@@ -2064,6 +2064,10 @@ dhcp6_checkstatusok(const struct interface *ifp,
        free(sbuf);
        state->lerror = code;
        errno = 0;
+
+       if (code != 0 && ifp->ctx->options & DHCPCD_TEST)
+               eloop_exit(ifp->ctx->eloop, EXIT_FAILURE);
+
        return (int)code;
 }