diff options
Diffstat (limited to 'libnetutils')
-rw-r--r-- | libnetutils/dhcp_utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libnetutils/dhcp_utils.c b/libnetutils/dhcp_utils.c index ba9893351..bad2e2ffd 100644 --- a/libnetutils/dhcp_utils.c +++ b/libnetutils/dhcp_utils.c @@ -170,14 +170,19 @@ int dhcp_do_request(const char *interface, */ int dhcp_stop(const char *interface) { + char result_prop_name[PROPERTY_KEY_MAX]; const char *ctrl_prop = "ctl.stop"; const char *desired_status = "stopped"; + snprintf(result_prop_name, sizeof(result_prop_name), "%s.%s.result", + DHCP_PROP_NAME_PREFIX, + interface); /* Stop the daemon and wait until it's reported to be stopped */ property_set(ctrl_prop, DAEMON_NAME); if (wait_for_property(DAEMON_PROP_NAME, desired_status, 5) < 0) { return -1; } + property_set(result_prop_name, "failed"); return 0; } |