All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Kourt <tim.a.kourt@linux.intel.com>
To: iwd@lists.01.org
Subject: [PATCH 3/6] netconfig: Use CamelCase for IPv4 DNS setting
Date: Tue, 10 Dec 2019 15:38:34 -0800	[thread overview]
Message-ID: <20191210233837.1499-3-tim.a.kourt@linux.intel.com> (raw)
In-Reply-To: <20191210233837.1499-1-tim.a.kourt@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

---
 src/netconfig.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/netconfig.c b/src/netconfig.c
index 0d5f9464..58a08b35 100644
--- a/src/netconfig.c
+++ b/src/netconfig.c
@@ -233,12 +233,18 @@ static char **netconfig_ipv4_get_dns(struct netconfig *netconfig, uint8_t proto)
 	const struct l_dhcp_lease *lease;
 	struct in_addr in_addr;
 	char **dns_list;
-	char **p;
 
-	p = dns_list = l_settings_get_string_list(netconfig->active_settings,
-							"IPv4", "dns", ' ');
+	dns_list = l_settings_get_string_list(netconfig->active_settings,
+							"IPv4", "DNS", ' ');
+	if (!dns_list)
+		dns_list = l_settings_get_string_list(
+						netconfig->active_settings,
+						"IPv4", "dns", ' ');
+
 	if (dns_list && *dns_list) {
-		for (; *p; p++) {
+		char **p;
+
+		for (p = dns_list; *p; p++) {
 			if (inet_pton(AF_INET, *p, &in_addr) == 1)
 				continue;
 
-- 
2.13.6

  parent reply	other threads:[~2019-12-10 23:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 23:38 [PATCH 1/6] netconfig: Use CamelCase for IPv4 address settings Tim Kourt
2019-12-10 23:38 ` [PATCH 2/6] netconfig: Use CamelCase for IPv4 gateway setting Tim Kourt
2019-12-10 23:38 ` Tim Kourt [this message]
2019-12-10 23:38 ` [PATCH 4/6] netconfig: Use CamelCase for IPv6 address settings Tim Kourt
2019-12-10 23:38 ` [PATCH 5/6] netconfig: Use CamelCase for IPv6 gateway setting Tim Kourt
2019-12-10 23:38 ` [PATCH 6/6] netconfig: Use CamelCase for IPv6 DNS setting Tim Kourt
2019-12-11  6:52 ` [PATCH 1/6] netconfig: Use CamelCase for IPv4 address settings Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191210233837.1499-3-tim.a.kourt@linux.intel.com \
    --to=tim.a.kourt@linux.intel.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.