diff options
author | Sergey A. Osokin <osa@FreeBSD.org> | 2004-05-21 08:39:04 +0000 |
---|---|---|
committer | Sergey A. Osokin <osa@FreeBSD.org> | 2004-05-21 08:39:04 +0000 |
commit | 06a5a4da0e253b6d437835aa746ec6c3ad3e64db (patch) | |
tree | 3a36862a45748c289390b0a1c3b89ac1b813a0e5 /net-mgmt/ehnt/files | |
parent | 652e7fd38f622838c40a83730be0734ce150ee03 (diff) | |
download | ports-06a5a4da0e253b6d437835aa746ec6c3ad3e64db.tar.gz ports-06a5a4da0e253b6d437835aa746ec6c3ad3e64db.zip |
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
Notes
Notes:
svn path=/head/; revision=109611
Diffstat (limited to 'net-mgmt/ehnt/files')
-rw-r--r-- | net-mgmt/ehnt/files/patch-ehnt.h | 14 | ||||
-rw-r--r-- | net-mgmt/ehnt/files/patch-ehnt__display.c | 14 | ||||
-rw-r--r-- | net-mgmt/ehnt/files/patch-ehnt__processflow.c | 11 |
3 files changed, 38 insertions, 1 deletions
diff --git a/net-mgmt/ehnt/files/patch-ehnt.h b/net-mgmt/ehnt/files/patch-ehnt.h new file mode 100644 index 000000000000..01c7f6df9ae7 --- /dev/null +++ b/net-mgmt/ehnt/files/patch-ehnt.h @@ -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 */ diff --git a/net-mgmt/ehnt/files/patch-ehnt__display.c b/net-mgmt/ehnt/files/patch-ehnt__display.c new file mode 100644 index 000000000000..a88d33586331 --- /dev/null +++ b/net-mgmt/ehnt/files/patch-ehnt__display.c @@ -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)); diff --git a/net-mgmt/ehnt/files/patch-ehnt__processflow.c b/net-mgmt/ehnt/files/patch-ehnt__processflow.c index 7441034b9ceb..c89c2a046413 100644 --- a/net-mgmt/ehnt/files/patch-ehnt__processflow.c +++ b/net-mgmt/ehnt/files/patch-ehnt__processflow.c @@ -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) { |