Date: Thu, 4 Jul 2013 16:42:00 +0200 (CEST) From: Lars Eggert <lars@eggert.org> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/180259: [MAINTAINER] benchmarks/flowgrind: fix IPv6 address parsing Message-ID: <201307041442.r64Eg0e9068979@stanley.muccbc.hq.netapp.com> Resent-Message-ID: <201307041450.r64Eo0XT075658@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 180259 >Category: ports >Synopsis: [MAINTAINER] benchmarks/flowgrind: fix IPv6 address parsing >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Jul 04 14:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Lars Eggert >Release: FreeBSD 9.1-STABLE amd64 >Organization: >Environment: System: FreeBSD stanley.muccbc.hq.netapp.com 9.1-STABLE FreeBSD 9.1-STABLE #1: Mon Jul 1 11:18:47 CEST >Description: Fix IPv6 address parsing. (Patch from upstream.) Also enable debugging by default. Generated with FreeBSD Port Tools 0.99_8 (mode: change, diff: suffix) >How-To-Repeat: >Fix: --- flowgrind-0.6.0_2.patch begins here --- diff -ruN ../flowgrind.orig/Makefile ./Makefile --- ../flowgrind.orig/Makefile 2013-07-04 16:19:31.000000000 +0200 +++ ./Makefile 2013-07-04 16:21:51.000000000 +0200 @@ -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 @@ USE_BZIP2= yes GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-debug FETCH_ARGS= -pRr MAN1= flowgrind-stop.1 \ diff -ruN ../flowgrind.orig/files/patch-flowgrind ./files/patch-flowgrind --- ../flowgrind.orig/files/patch-flowgrind 1970-01-01 01:00:00.000000000 +0100 +++ ./files/patch-flowgrind 2013-07-04 16:20:29.000000000 +0200 @@ -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); --- flowgrind-0.6.0_2.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307041442.r64Eg0e9068979>