Skip to contentSkip to conversation

Tools: hv: KVP: Fix a bug in IPV6 subnet enumeration

PATCH New K. Y. Srinivasan 1 participant 1 message Jul 11, 2013

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

PATCH 1/1 Tools: hv: KVP: Fix a bug in IPV6 subnet enumeration

Each subnet string needs to be separated with a semicolon. Fix this bug.

---
 tools/hv/hv_kvp_daemon.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
tools/hv/hv_kvp_daemon.c +3 -2
index ca9fa4d..07819bf 100644
@@ -1026,9 +1026,10 @@ kvp_get_ip_info(int family, char *if_name, int op,
 
 				if (sn_offset == 0)
 					strcpy(sn_str, cidr_mask);
-				else
+				else {
+					strcat((char *)ip_buffer->sub_net, ";");
 					strcat(sn_str, cidr_mask);
-				strcat((char *)ip_buffer->sub_net, ";");
+				}
 				sn_offset += strlen(sn_str) + 1;
 			}
 
Signature · 1 line
1.7.4.1