hv/hv_kvp_daemon: Some small fixes for handling NM keyfiles
authorAni Sinha <anisinha@redhat.com>
Mon, 16 Oct 2023 13:31:22 +0000 (19:01 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 06:33:02 +0000 (07:33 +0100)
commitf969fd598682e4bb97f63de2189a4284c495e125
treea8518814a07de73f34ead6b7a871363bba055e46
parent3fca09b62ae8e91b704dd37809829ed75584b1f0
hv/hv_kvp_daemon: Some small fixes for handling NM keyfiles

[ Upstream commit c3803203bc5ec910a3eb06172cf6fb368e0e4390 ]

Some small fixes:
 - lets make sure we are not adding ipv4 addresses in ipv6 section in
   keyfile and vice versa.
 - ADDR_FAMILY_IPV6 is a bit in addr_family. Test that bit instead of
   checking the whole value of addr_family.
 - Some trivial fixes in hv_set_ifconfig.sh.

These fixes are proposed after doing some internal testing at Red Hat.

CC: Shradha Gupta <shradhagupta@linux.microsoft.com>
CC: Saurabh Sengar <ssengar@linux.microsoft.com>
Fixes: 42999c904612 ("hv/hv_kvp_daemon:Support for keyfile based connection profile")
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Shradha Gupta <Shradhagupta@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20231016133122.2419537-1-anisinha@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/hv/hv_kvp_daemon.c
tools/hv/hv_set_ifconfig.sh