From: Roy Marples Date: Thu, 15 May 2008 19:30:21 +0000 (+0000) Subject: Fix test. X-Git-Tag: v4.0.2~387 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ef196b788df888846cf02e5979ce4e636e29b12;p=thirdparty%2Fdhcpcd.git Fix test. --- diff --git a/client.c b/client.c index dca85e87..d8c44d58 100644 --- a/client.c +++ b/client.c @@ -1016,7 +1016,8 @@ handle_dhcp(struct if_state *state, struct dhcp_message **dhcpp, if (state->options & DHCPCD_TEST) { exec_script(options, iface->name, "TEST", dhcp, NULL); - return -1; + free(dhcp); + return 0; } free(dhcp); @@ -1213,8 +1214,11 @@ handle_packet(struct if_state *state, const struct options *options) if (*p != DHCP_END) *++p = DHCP_END; } - if (handle_dhcp(state, &dhcp, options) == 0) + if (handle_dhcp(state, &dhcp, options) == 0) { + if (state->options & DHCPCD_TEST) + return -1; return 0; + } if (state->options & DHCPCD_FORKED) return -1; }