From owner-freebsd-ports-bugs@FreeBSD.ORG Mon May 24 01:31:09 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B7D616A4CE for ; Mon, 24 May 2004 01:31:09 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5857843D45 for ; Mon, 24 May 2004 01:31:09 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i4O8UPYk006854 for ; Mon, 24 May 2004 01:30:25 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4O8UP4l006853; Mon, 24 May 2004 01:30:25 -0700 (PDT) (envelope-from gnats) Resent-Date: Mon, 24 May 2004 01:30:25 -0700 (PDT) Resent-Message-Id: <200405240830.i4O8UP4l006853@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitry Morozovsky Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FC7D16A4CE for ; Mon, 24 May 2004 01:25:15 -0700 (PDT) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id A405343D1D for ; Mon, 24 May 2004 01:25:14 -0700 (PDT) (envelope-from marck@woozle.rinet.ru) Received: from woozle.rinet.ru (localhost [127.0.0.1]) by woozle.rinet.ru (8.12.11/8.12.11) with ESMTP id i4O8P3ea022719 for ; Mon, 24 May 2004 12:25:03 +0400 (MSD) (envelope-from marck@woozle.rinet.ru) Received: (from marck@localhost) by woozle.rinet.ru (8.12.11/8.12.11/Submit) id i4O8P3Nv022718; Mon, 24 May 2004 12:25:03 +0400 (MSD) (envelope-from marck) Message-Id: <200405240825.i4O8P3Nv022718@woozle.rinet.ru> Date: Mon, 24 May 2004 12:25:03 +0400 (MSD) From: Dmitry Morozovsky To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/67117: [maintainer] net-mgmt/ehnt fixes (0.3_5 -> 0.3_6) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dmitry Morozovsky List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2004 08:31:09 -0000 >Number: 67117 >Category: ports >Synopsis: [maintainer] net-mgmt/ehnt fixes (0.3_5 -> 0.3_6) >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: Mon May 24 01:30:24 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Dmitry Morozovsky >Release: FreeBSD 4-STABLE i386 >Organization: Cronyx Plus LLC (RiNet ISP) >Environment: System: FreeBSD 4-STABLE >Description: These patches contain fixes for net-mgmt/ehnt: - turn off interactivity for pipe-oriented mode (colondump) - convert ASN table from static to alloc()ed to reduce memory footprint - bump PORTREVISION >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/net-mgmt/ehnt/Makefile,v retrieving revision 1.11 diff -u -r1.11 Makefile --- Makefile 21 May 2004 08:39:04 -0000 1.11 +++ Makefile 24 May 2004 08:17:04 -0000 @@ -7,7 +7,7 @@ PORTNAME= ehnt PORTVERSION= 0.3 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} Index: files/patch-ehnt-lookup =================================================================== RCS file: /home/ncvs/ports/net-mgmt/ehnt/files/patch-ehnt-lookup,v retrieving revision 1.1 diff -u -r1.1 patch-ehnt-lookup --- files/patch-ehnt-lookup 11 Aug 2001 17:38:05 -0000 1.1 +++ files/patch-ehnt-lookup 24 May 2004 08:17:04 -0000 @@ -1,8 +1,25 @@ ---- ehnt_lookup.c.orig Wed Jul 18 00:47:37 2001 -+++ ehnt_lookup.c Fri Aug 3 19:54:34 2001 -@@ -36,7 +36,7 @@ + +$FreeBSD$ + +--- ehnt_lookup.c.orig Thu Oct 4 22:18:29 2001 ++++ ehnt_lookup.c Mon May 24 12:01:50 2004 +@@ -25,7 +25,7 @@ - memset(ASNs,0,sizeof(ASNs)); + + #define ASNCOUNT 65536 +-char * ASNs[ASNCOUNT]; ++char ** ASNs; + + int Init_ASN_Lookups(void) { + +@@ -34,9 +34,11 @@ + int asn; + char line[100],asnname[100]; + +- memset(ASNs,0,sizeof(ASNs)); ++ ASNs = calloc(ASNCOUNT, sizeof(char *)); ++ if (ASNs == NULL) ++ perror("out of memory"); - if ( ! (f=fopen ("asnc.txt","r")) ) { + if ( ! (f=fopen (ASNCDIR "/asnc.txt","r")) ) { Index: files/patch-ehnt__client.c =================================================================== RCS file: /home/ncvs/ports/net-mgmt/ehnt/files/patch-ehnt__client.c,v retrieving revision 1.1 diff -u -r1.1 patch-ehnt__client.c --- files/patch-ehnt__client.c 16 Nov 2002 14:36:34 -0000 1.1 +++ files/patch-ehnt__client.c 24 May 2004 08:17:04 -0000 @@ -1,9 +1,29 @@ -$FreeBSD: ports/net-mgmt/ehnt/files/patch-ehnt__client.c,v 1.1 2002/11/16 14:36:34 edwin Exp $ +$FreeBSD$ --- ehnt_client.c.orig Thu Oct 4 22:18:29 2001 -+++ ehnt_client.c Thu Nov 14 22:12:07 2002 -@@ -89,7 +89,7 @@ ++++ ehnt_client.c Mon May 24 11:59:17 2004 +@@ -69,7 +69,8 @@ + printf("Warning: can't catch interrupt signal\n"); + } + fflush(stdout); +- set_term(SET_TERM_RAW); ++ if (e_cfg->mode != EM_COLONDUMP) ++ set_term(SET_TERM_RAW); + setbuf(stdout,NULL); + + for ( ; ; ) { +@@ -78,7 +79,8 @@ + int maxfd=sockfd; + + FD_ZERO(&read_fds); +- FD_SET(STDIN_FILENO,&read_fds); ++ if (e_cfg->mode != EM_COLONDUMP) ++ FD_SET(STDIN_FILENO,&read_fds); + FD_SET(sockfd,&read_fds); + + fflush(stdout); +@@ -89,7 +91,7 @@ if (FD_ISSET(sockfd,&read_fds)) { ehnt_client_processmessage(sockfd,routeraddr,my_ehnt_struct); } Index: files/patch-ehnt__main.c =================================================================== RCS file: files/patch-ehnt__main.c diff -N files/patch-ehnt__main.c --- /dev/null Mon May 24 12:15:22 2004 +++ files/patch-ehnt__main.c Mon May 24 12:12:34 2004 @@ -0,0 +1,28 @@ + +$FreeBSD$ + +--- ehnt_main.c.orig Thu Oct 4 22:18:29 2001 ++++ ehnt_main.c Mon May 24 12:03:14 2004 +@@ -228,14 +228,15 @@ + e_dat.recentmin=(int)(ts->tm_min + (ts->tm_hour*60) + (ts->tm_yday * 60 * 24)); + } + +- NewStats(e_dat.stats); +- +- Init_ASN_Lookups(); ++ if (e_cfg.mode != EM_COLONDUMP) { ++ NewStats(e_dat.stats); ++ Init_ASN_Lookups(); + +- /* ehnt_client (in ehnt_client.c) connects to the server, then loops forever, +- calling ProcessPacket for each incoming flow. */ +- printf("Using report interval of %d minute(s)\n",e_cfg.si); +- printf("Starting. Hit '?' for help with keys.\r"); ++ /* ehnt_client (in ehnt_client.c) connects to the server, then loops forever, ++ calling ProcessPacket for each incoming flow. */ ++ printf("Using report interval of %d minute(s)\n",e_cfg.si); ++ printf("Starting. Hit '?' for help with keys.\r"); ++ } + + ehnt_client(e_cfg.servername,e_cfg.serverport,&my_ehnt_struct); + } >Release-Note: >Audit-Trail: >Unformatted: