diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-12-07 07:58:29 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-07 07:58:29 +0100 |
commit | 93a5ff49828eda5435d79f56c954562144fcf88b (patch) | |
tree | e67d22026f9aea7638d09f6ff8d75e274ed17c18 | |
parent | cc27196d76cbf700b81d628e037a9fcb8c043e18 (diff) | |
download | connman-93a5ff49828eda5435d79f56c954562144fcf88b.tar.gz connman-93a5ff49828eda5435d79f56c954562144fcf88b.tar.bz2 connman-93a5ff49828eda5435d79f56c954562144fcf88b.zip |
Add parsing of Domainname, Hostname and Timeserver results
-rw-r--r-- | plugins/dhclient.c | 4 | ||||
-rw-r--r-- | scripts/dhclient.conf | 6 | ||||
-rw-r--r-- | src/dhcp.c | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/plugins/dhclient.c b/plugins/dhclient.c index cb70ef73..6a0530f3 100644 --- a/plugins/dhclient.c +++ b/plugins/dhclient.c @@ -301,8 +301,12 @@ static DBusHandlerResult dhclient_filter(DBusConnection *conn, } else if (g_strcmp0(key, "new_domain_name_servers") == 0) { connman_dhcp_set_value(task->dhcp, "Nameserver", value); } else if (g_ascii_strcasecmp(key, "new_domain_name") == 0) { + connman_dhcp_set_value(task->dhcp, "Domainname", value); } else if (g_ascii_strcasecmp(key, "new_domain_search") == 0) { } else if (g_ascii_strcasecmp(key, "new_host_name") == 0) { + connman_dhcp_set_value(task->dhcp, "Hostname", value); + } else if (g_ascii_strcasecmp(key, "new_ntp_servers") == 0) { + connman_dhcp_set_value(task->dhcp, "Timeserver", value); } dbus_message_iter_next(&dict); diff --git a/scripts/dhclient.conf b/scripts/dhclient.conf index 4b206a3b..dc116ef1 100644 --- a/scripts/dhclient.conf +++ b/scripts/dhclient.conf @@ -1,3 +1,5 @@ send host-name "<hostname>"; -request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, host-name; +request subnet-mask, broadcast-address, routers, host-name, + domain-search, domain-name, domain-name-servers, + time-offset, time-servers, ntp-servers, interface-mtu; +require subnet-mask, domain-name-servers; @@ -114,6 +114,9 @@ void connman_dhcp_set_value(struct connman_dhcp *dhcp, } else if (g_strcmp0(key, "Nameserver") == 0) { g_free(dhcp->element->ipv4.nameserver); dhcp->element->ipv4.nameserver = g_strdup(value); + } else if (g_strcmp0(key, "Domainname") == 0) { + } else if (g_strcmp0(key, "Hostname") == 0) { + } else if (g_strcmp0(key, "Timeserver") == 0) { } } |