Skip to contentSkip to conversation

netconfig: Actually use the DNS override values

PATCH In review Andrew Zaborowski 2 participants 3 messages Sep 3, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 netconfig: Actually use the DNS override values

In netconfig_load_settings apply the DNS overrides strings we've loaded instead of leaking them.

Fixes ad228461abbf ("netconfig: Move loading settings to new method, refactor")
---
 src/netconfig.c | 2 ++
 1 file changed, 2 insertions(+)
src/netconfig.c +2 -0
index 9bbaece5..c748630b 100644
@@ -1293,6 +1293,8 @@ bool netconfig_load_settings(struct netconfig *netconfig,
 							mac_address, ETH_ALEN);
 
 	netconfig->active_settings = active_settings;
+	netconfig->dns4_overrides = dns4_overrides;
+	netconfig->dns6_overrides = dns6_overrides;
 	return true;
 
 err_v6_addr:
Signature · 1 line
2.30.2
#1 lore raw

Hi Andrew,

Quoted 8 lines · Andrew Zaborowski

In netconfig_load_settings apply the DNS overrides strings we've loaded instead of leaking them.

Fixes ad228461abbf ("netconfig: Move loading settings to new method, refactor")
---
  src/netconfig.c | 2 ++
  1 file changed, 2 insertions(+)

Both applied, thanks.

Regards,
-Denis

#2 lore raw

PATCH 2/2 station: Check ie_tlv_iter_next return value

In reply to Andrew Zaborowski

This can't be false but check it to calm static analysis.

---
 src/station.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
src/station.c +5 -2
index 9f00bfb3..afece9eb 100644
@@ -2462,8 +2462,11 @@ static void station_connect_ok(struct station *station)
 
 			ie_tlv_iter_init(&iter, hs->fils_ip_resp_ie,
 						hs->fils_ip_resp_ie[1] + 2);
-			ie_tlv_iter_next(&iter);
-			r = ie_parse_fils_ip_addr_response(&iter, &info);
+			if (!L_WARN_ON(unlikely(!ie_tlv_iter_next(&iter))))
+				r = ie_parse_fils_ip_addr_response(&iter,
+									&info);
+			else
+				r = -ENOMSG;
 
 			if (r != 0)
 				l_debug("Error parsing the FILS IP Address "
Signature · 1 line
2.30.2