]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix Test returning to userland.
authorRoy Marples <roy@marples.name>
Mon, 18 Aug 2008 18:35:12 +0000 (18:35 +0000)
committerRoy Marples <roy@marples.name>
Mon, 18 Aug 2008 18:35:12 +0000 (18:35 +0000)
client.c

index 18be14aac42a5c002963ace80bc0bdeb6d574438..72178c8de09f5c00234eb3fec6908d4b512e418b 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1431,7 +1431,9 @@ handle_dhcp(struct if_state *state, struct dhcp_message **dhcpp,
                log_dhcp(LOG_INFO, "offered", dhcp);
                if (state->options & DHCPCD_TEST) {
                        run_script(options, iface->name, "TEST", dhcp, NULL);
-                       return 0;
+                       /* Fake the fact we forked so we return 0 to userland */
+                       state->options |= DHCPCD_FORKED;
+                       return -1;
                }
                free(state->offer);
                state->offer = dhcp;