Skip to content

Commit ed4bb97

Browse files
kattisrinivasangregkh
authored andcommitted
Tools: hv: KVP: Fix a bug in IPV6 subnet enumeration
Each subnet string needs to be separated with a semicolon. Fix this bug. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Cc: Stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c5e2254 commit ed4bb97

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎tools/hv/hv_kvp_daemon.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,9 +1026,10 @@ kvp_get_ip_info(int family, char *if_name, int op,
10261026

10271027
if (sn_offset == 0)
10281028
strcpy(sn_str, cidr_mask);
1029-
else
1029+
else {
1030+
strcat((char *)ip_buffer->sub_net, ";");
10301031
strcat(sn_str, cidr_mask);
1031-
strcat((char *)ip_buffer->sub_net, ";");
1032+
}
10321033
sn_offset += strlen(sn_str) + 1;
10331034
}
10341035

0 commit comments

Comments
 (0)