Line 0
Link Here
|
|
|
1 |
--- src/flowgrind.c |
2 |
+++ src/flowgrind.c |
3 |
@@ -1872,7 +1872,7 @@ static void parse_flow_option(int ch, char* optarg, int current_flow_ids[]) { |
4 |
|
5 |
if (extra_rpc) { |
6 |
/* Now it's getting tricky... */ |
7 |
- /* 1st case: IPv6 with port, e.g. "[a:b::c]a:5999" */ |
8 |
+ /* 1st case: IPv6 with port, e.g. "[a:b::c]:5999" */ |
9 |
if ((sepptr = strchr(rpc_address, ']'))) { |
10 |
is_ipv6 = 1; |
11 |
*sepptr = '\0'; |
12 |
@@ -1884,7 +1884,7 @@ static void parse_flow_option(int ch, char* optarg, int current_flow_ids[]) { |
13 |
port = atoi(sepptr); |
14 |
} else if ((sepptr = strchr(rpc_address, ':'))) { |
15 |
/* 2nd case: IPv6 without port, e.g. "a:b::c" */ |
16 |
- if (strchr(sepptr, ':')) { |
17 |
+ if (strchr(sepptr+1, ':')) { |
18 |
is_ipv6 = 1; |
19 |
} else { |
20 |
/* 3rd case: IPv4 or name with port 1.2.3.4:5999*/ |
21 |
@@ -1910,7 +1910,7 @@ static void parse_flow_option(int ch, char* optarg, int current_flow_ids[]) { |
22 |
fprintf(stderr, "No test host given in argument\n"); |
23 |
usage(); |
24 |
} |
25 |
- if (is_ipv6) |
26 |
+ if (is_ipv6) |
27 |
sprintf(url, "http://[%s]:%d/RPC2", rpc_address, port); |
28 |
else |
29 |
sprintf(url, "http://%s:%d/RPC2", rpc_address, port); |