mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Fix signed int problem in display (when displaying very
active flows it is possible to overflow bytecount). [1] Also: [2] o use DOCSDIR and DATADIR macros o move files from pkg-plist to Makefile o remove pkg-plist Reported by: Gleb Smirnoff <glebius at sell dot sick dot ru> Submitted by: Dmitry Morozovsky <marck at rinet dot ru> (maintainer) [1], osa [2] Approved by: maintainer PR: 66936
This commit is contained in:
parent
652e7fd38f
commit
06a5a4da0e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=109611
5 changed files with 49 additions and 13 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= ehnt
|
||||
PORTVERSION= 0.3
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
|
@ -17,6 +17,12 @@ COMMENT= A simple Cisco NetFlow data collector
|
|||
|
||||
USE_PERL5= yes
|
||||
|
||||
PLIST_FILES= bin/ehnt etc/rc.d/ehntserv.sh.sample \
|
||||
sbin/ehntserv share/ehnt/asnc.txt
|
||||
PLIST_DIRS+= share/ehnt
|
||||
|
||||
PORTDOCS= README
|
||||
|
||||
MAN1= ehnt.1
|
||||
MAN8= ehntserv.8
|
||||
|
||||
|
@ -29,11 +35,11 @@ do-install:
|
|||
${INSTALL_SCRIPT} ${FILESDIR}/ehntserv.sh.sample ${PREFIX}/etc/rc.d/
|
||||
${INSTALL_MAN} ${WRKSRC}/ehnt.1 ${PREFIX}/man/man1/
|
||||
${INSTALL_MAN} ${WRKSRC}/ehntserv.8 ${PREFIX}/man/man8/
|
||||
${MKDIR} ${PREFIX}/share/ehnt
|
||||
${INSTALL_DATA} ${WRKSRC}/asnc.txt ${PREFIX}/share/ehnt/
|
||||
${MKDIR} ${DATADIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/asnc.txt ${DATADIR}/
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${PREFIX}/share/doc/ehnt
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/ehnt/
|
||||
${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${DOCSDIR}/
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
14
net-mgmt/ehnt/files/patch-ehnt.h
Normal file
14
net-mgmt/ehnt/files/patch-ehnt.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
$FreeBSD$
|
||||
|
||||
--- ehnt.h.orig Thu Oct 4 22:18:29 2001
|
||||
+++ ehnt.h Thu May 20 16:07:24 2004
|
||||
@@ -93,7 +93,7 @@
|
||||
int ProcessFlow(struct flow_ver5_rec *, struct in_addr *, struct ehnt_struct *);
|
||||
int Init_ASN_Lookups(void);
|
||||
char * ASN_Lookup(int);
|
||||
-char * prettybytes(int);
|
||||
+char * prettybytes(unsigned);
|
||||
void DisplayReport(time_t, struct ehnt_data *);
|
||||
|
||||
/* these EM_ defines are for the mode config variable */
|
14
net-mgmt/ehnt/files/patch-ehnt__display.c
Normal file
14
net-mgmt/ehnt/files/patch-ehnt__display.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
$FreeBSD$
|
||||
|
||||
--- ehnt_display.c.orig Thu Oct 4 22:18:29 2001
|
||||
+++ ehnt_display.c Thu May 20 16:06:07 2004
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
static char str[100];
|
||||
|
||||
-char * prettybytes(int bytes) {
|
||||
+char * prettybytes(unsigned bytes) {
|
||||
|
||||
if (bytes < 1024) sprintf(str,"%4d", bytes);
|
||||
else if (bytes < (1024*1024)) sprintf(str,"%4dK",(bytes/1024));
|
|
@ -2,7 +2,7 @@
|
|||
$FreeBSD$
|
||||
|
||||
--- ehnt_processflow.c.orig Thu Oct 4 22:18:29 2001
|
||||
+++ ehnt_processflow.c Thu Nov 14 22:17:18 2002
|
||||
+++ ehnt_processflow.c Fri May 21 11:22:02 2004
|
||||
@@ -218,7 +218,7 @@
|
||||
dstip.s_addr=rec->dstaddr;
|
||||
nexthop.s_addr=rec->nexthop;
|
||||
|
@ -12,3 +12,12 @@ $FreeBSD$
|
|||
printf("%d:%s:%d:",
|
||||
rec->input_index,
|
||||
inet_ntoa(srcip),
|
||||
@@ -228,7 +228,7 @@
|
||||
inet_ntoa(dstip),
|
||||
rec->dstport);
|
||||
|
||||
- printf("%d:%d:%d:",rec->dOctets,rec->dPkts,rec->prot);
|
||||
+ printf("%u:%d:%d:",rec->dOctets,rec->dPkts,rec->prot);
|
||||
printf("%d:%d\n",rec->src_as,rec->dst_as);
|
||||
|
||||
if (e_flt->big) {
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
bin/ehnt
|
||||
etc/rc.d/ehntserv.sh.sample
|
||||
sbin/ehntserv
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
share/ehnt/asnc.txt
|
||||
@dirrm share/ehnt
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
Loading…
Add table
Reference in a new issue