From: Patrik Flykt Date: Mon, 4 Jun 2012 10:45:03 +0000 (+0300) Subject: service: Check that the supplied nameserver is in numeric format X-Git-Tag: 2.0_alpha~87 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fconnectivity%2Fconnman.git;a=commitdiff_plain;h=0e9992014e61671dc81685b7ce87c2da39b877fc service: Check that the supplied nameserver is in numeric format Check that the supplied nameserver is in numeric format when set with 'Nameservers.Configuration' service property. --- diff --git a/src/service.c b/src/service.c index c225af5..94ef7b6 100644 --- a/src/service.c +++ b/src/service.c @@ -3041,10 +3041,12 @@ static DBusMessage *set_property(DBusConnection *conn, const char *val; dbus_message_iter_get_basic(&entry, &val); dbus_message_iter_next(&entry); - if (str->len > 0) - g_string_append_printf(str, " %s", val); - else - g_string_append(str, val); + if (connman_inet_check_ipaddress(val) > 0) { + if (str->len > 0) + g_string_append_printf(str, " %s", val); + else + g_string_append(str, val); + } } remove_nameservers(service, NULL, service->nameservers_config);