public inbox for linux-hyperv@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hv/hv_kvp_daemon: Pass NIC name to hv_get_dns_info as well
@ 2024-11-12 15:04 Vitaly Kuznetsov
  2024-12-07  7:56 ` Wei Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Vitaly Kuznetsov @ 2024-11-12 15:04 UTC (permalink / raw)
  To: linux-hyperv
  Cc: mhklinux, K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
	linux-kernel

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.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 tools/hv/hv_kvp_daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index ae57bf69ad4a..296a7a62c54d 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -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.
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hv/hv_kvp_daemon: Pass NIC name to hv_get_dns_info as well
  2024-11-12 15:04 [PATCH] hv/hv_kvp_daemon: Pass NIC name to hv_get_dns_info as well Vitaly Kuznetsov
@ 2024-12-07  7:56 ` Wei Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2024-12-07  7:56 UTC (permalink / raw)
  To: Vitaly Kuznetsov
  Cc: linux-hyperv, mhklinux, K. Y. Srinivasan, Haiyang Zhang, Wei Liu,
	Dexuan Cui, linux-kernel

On Tue, Nov 12, 2024 at 04:04:01PM +0100, Vitaly Kuznetsov wrote:
> 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.
> 
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

Applied. Thanks.

> ---
>  tools/hv/hv_kvp_daemon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
> index ae57bf69ad4a..296a7a62c54d 100644
> --- a/tools/hv/hv_kvp_daemon.c
> +++ b/tools/hv/hv_kvp_daemon.c
> @@ -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.
> -- 
> 2.47.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-07  7:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 15:04 [PATCH] hv/hv_kvp_daemon: Pass NIC name to hv_get_dns_info as well Vitaly Kuznetsov
2024-12-07  7:56 ` Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox