pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/26541: www/http_load proxy support broken (with patch)



>Number:         26541
>Category:       pkg
>Synopsis:       www/http_load proxy support broken (with patch)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 03 22:18:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Mike Grupenhoff
>Release:        NetBSD 1.6
>Organization:
>Environment:
System: NetBSD seahorse 1.6 NetBSD 1.6 (GENERIC) #0: Sun Sep 8 19:43:40 UTC 
2002 
autobuild%tgm.daemon.org@localhost:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/compile/GENERIC
 i386
Architecture: i386
Machine: i386
>Description:
        The -proxy option to http_load doesn't do anything.  This appears
        to be due to the IPV6 support added.
>How-To-Repeat:
        http_load -proxy <proxy>:<port> -parallel 1 -seconds 10 urls

        notice that the requests go directly to the server.
>Fix:
--- http_load.c.orig    Tue Aug  3 14:16:55 2004
+++ http_load.c Tue Aug  3 14:18:23 2004
@@ -655,8 +655,8 @@
     (void) memset( &hints, 0, sizeof(hints) );
     hints.ai_family = PF_UNSPEC;
     hints.ai_socktype = SOCK_STREAM;
-    (void) snprintf( portstr, sizeof(portstr), "%d", (int) urls[url_num].port 
);
-    if ( (gaierr = getaddrinfo( urls[url_num].hostname, portstr, &hints, &ai 
)) != 0 )
+    (void) snprintf( portstr, sizeof(portstr), "%d", (int) port );
+    if ( (gaierr = getaddrinfo( hostname, portstr, &hints, &ai )) != 0 )
        {
        (void) fprintf(
            stderr, "%s: getaddrinfo %s - %s\n", argv0, urls[url_num].hostname,
@@ -724,15 +724,15 @@
 
     (void) fprintf(
        stderr, "%s: no valid address found for host %s\n", argv0,
-       urls[url_num].hostname );
+       hostname );
     exit( 1 );
 
 #else /* USE_IPV6 */
 
-    he = gethostbyname( urls[url_num].hostname );
+    he = gethostbyname( hostname );
     if ( he == (struct hostent*) 0 )
        {
-       (void) fprintf( stderr, "%s: unknown host - %s\n", argv0, 
urls[url_num].hostname );
+       (void) fprintf( stderr, "%s: unknown host - %s\n", argv0, hostname );
        exit( 1 );
        }
     urls[url_num].sock_family = urls[url_num].sa.sin_family = he->h_addrtype;
>Release-Note:
>Audit-Trail:
>Unformatted:



Home | Main Index | Thread Index | Old Index