diff options
author | wg <wg@FreeBSD.org> | 2013-07-05 19:53:08 +0800 |
---|---|---|
committer | wg <wg@FreeBSD.org> | 2013-07-05 19:53:08 +0800 |
commit | 5bc7c1da7a2f60b815e0011524c2407210c3eab3 (patch) | |
tree | a44810a1ed33d76e1368ba7e629aebe7634843e1 /benchmarks | |
parent | 6c84ee70190f08312cd13ebd75877172fb5ac8f6 (diff) | |
download | freebsd-ports-gnome-5bc7c1da7a2f60b815e0011524c2407210c3eab3.tar.gz freebsd-ports-gnome-5bc7c1da7a2f60b815e0011524c2407210c3eab3.tar.zst freebsd-ports-gnome-5bc7c1da7a2f60b815e0011524c2407210c3eab3.zip |
benchmarks/flowgrind: fix IPv6 address parsing
- Fix IPv6 address parsing (upstream)
- Enable debug by default
PR: ports/180259
Submitted by: Lars Eggert <lars@eggert.org> (maintainer)
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/flowgrind/Makefile | 3 | ||||
-rw-r--r-- | benchmarks/flowgrind/files/patch-flowgrind | 29 |
2 files changed, 31 insertions, 1 deletions
diff --git a/benchmarks/flowgrind/Makefile b/benchmarks/flowgrind/Makefile index 46f87871d13d..7f46a8d9bfd6 100644 --- a/benchmarks/flowgrind/Makefile +++ b/benchmarks/flowgrind/Makefile @@ -3,7 +3,7 @@ PORTNAME= flowgrind PORTVERSION= 0.6.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= benchmarks MASTER_SITES= https://launchpad.net/flowgrind/trunk/${PORTNAME}-0.6/+download/ @@ -16,6 +16,7 @@ BUILD_DEPENDS= ${LOCALBASE}/lib/libpcap.so:${PORTSDIR}/net/libpcap USE_BZIP2= yes GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-debug FETCH_ARGS= -pRr MAN1= flowgrind-stop.1 \ diff --git a/benchmarks/flowgrind/files/patch-flowgrind b/benchmarks/flowgrind/files/patch-flowgrind new file mode 100644 index 000000000000..89074e2d4d35 --- /dev/null +++ b/benchmarks/flowgrind/files/patch-flowgrind @@ -0,0 +1,29 @@ +--- src/flowgrind.c ++++ src/flowgrind.c +@@ -1872,7 +1872,7 @@ static void parse_flow_option(int ch, char* optarg, int current_flow_ids[]) { + + if (extra_rpc) { + /* Now it's getting tricky... */ +- /* 1st case: IPv6 with port, e.g. "[a:b::c]a:5999" */ ++ /* 1st case: IPv6 with port, e.g. "[a:b::c]:5999" */ + if ((sepptr = strchr(rpc_address, ']'))) { + is_ipv6 = 1; + *sepptr = '\0'; +@@ -1884,7 +1884,7 @@ static void parse_flow_option(int ch, char* optarg, int current_flow_ids[]) { + port = atoi(sepptr); + } else if ((sepptr = strchr(rpc_address, ':'))) { + /* 2nd case: IPv6 without port, e.g. "a:b::c" */ +- if (strchr(sepptr, ':')) { ++ if (strchr(sepptr+1, ':')) { + is_ipv6 = 1; + } else { + /* 3rd case: IPv4 or name with port 1.2.3.4:5999*/ +@@ -1910,7 +1910,7 @@ static void parse_flow_option(int ch, char* optarg, int current_flow_ids[]) { + fprintf(stderr, "No test host given in argument\n"); + usage(); + } +- if (is_ipv6) ++ if (is_ipv6) + sprintf(url, "http://[%s]:%d/RPC2", rpc_address, port); + else + sprintf(url, "http://%s:%d/RPC2", rpc_address, port); |