Skip to contentSkip to conversation

hv/hv_kvp_daemon: Pass NIC name to hv_get_dns_info as well

PATCH Applied Vitaly Kuznetsov 2 participants 2 messages Nov 12, 2024 – Dec 7, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hv/hv_kvp_daemon: Pass NIC name to hv_get_dns_info as well

The reference implementation of hv_get_dns_info which is in the tree uses /etc/resolv.conf to get DNS servers and this does not require to know which NIC is queried. Distro specific implementations, however, may want to provide per-NIC, fine grained information. E.g. NetworkManager keeps track of DNS servers per connection.

Similar to hv_get_dhcp_info, pass NIC name as a parameter to hv_get_dns_info script.

---
 tools/hv/hv_kvp_daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hv/hv_kvp_daemon.c +1 -1
index ae57bf69ad4a..296a7a62c54d 100644
@@ -725,7 +725,7 @@ static void kvp_get_ipconfig_info(char *if_name,
 	 * .
 	 */
 
-	sprintf(cmd, KVP_SCRIPTS_PATH "%s",  "hv_get_dns_info");
+	sprintf(cmd, KVP_SCRIPTS_PATH "%s %s", "hv_get_dns_info", if_name);
 
 	/*
 	 * Execute the command to gather DNS info.
Signature · 1 line
2.47.0
maintainer Applied
#1 lore raw
Quoted 10 lines · Vitaly Kuznetsov

The reference implementation of hv_get_dns_info which is in the tree uses /etc/resolv.conf to get DNS servers and this does not require to know which NIC is queried. Distro specific implementations, however, may want to provide per-NIC, fine grained information. E.g. NetworkManager keeps track of DNS servers per connection.

Similar to hv_get_dhcp_info, pass NIC name as a parameter to hv_get_dns_info script.

Applied. Thanks.

Quoted 20 lines
---
 tools/hv/hv_kvp_daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hv/hv_kvp_daemon.c +1 -1
index ae57bf69ad4a..296a7a62c54d 100644
@@ -725,7 +725,7 @@ static void kvp_get_ipconfig_info(char *if_name,
 	 * .
 	 */
 
-	sprintf(cmd, KVP_SCRIPTS_PATH "%s",  "hv_get_dns_info");
+	sprintf(cmd, KVP_SCRIPTS_PATH "%s %s", "hv_get_dns_info", if_name);
 
 	/*
 	 * Execute the command to gather DNS info.
Signature · 1 line
2.47.0