diff options
| author | Roy Marples <roy@marples.name> | 2020-11-25 15:14:11 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-11-25 15:14:11 +0000 |
| commit | 84bf6e55f7e54895f4cbeebd35a6b9ac64e7498f (patch) | |
| tree | efed353bb8803959117b91299c0dbf0982d28fb4 | |
| parent | 3ee6b4aab9f052c148c2838c36cffa53cc2e4d54 (diff) | |
| download | dhcpcd-84bf6e55f7e54895f4cbeebd35a6b9ac64e7498f.tar.xz | |
DHCP6: Abort in test mode when an error is returned by server.
| -rw-r--r-- | src/dhcp6.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |
