From: Roy Marples Date: Wed, 25 Nov 2020 15:14:11 +0000 (+0000) Subject: DHCP6: Abort in test mode when an error is returned by server. X-Git-Tag: v9.3.4~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84bf6e55f7e54895f4cbeebd35a6b9ac64e7498f;p=thirdparty%2Fdhcpcd.git DHCP6: Abort in test mode when an error is returned by server. --- diff --git a/src/dhcp6.c b/src/dhcp6.c index ec6d7738..4dcdcaab 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -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; }