[packages/iptraf-ng] - up to 1.1.4 - obsolete venerable iptraf - pulled bugfix from fedora - removed obsolete include pat

baggins baggins at pld-linux.org
Tue Jan 28 20:45:12 CET 2014


commit d206c84db8de9bd31368d489e96b1f99cc6e53d8
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Jan 28 20:44:38 2014 +0100

    - up to 1.1.4
    - obsolete venerable iptraf
    - pulled bugfix from fedora
    - removed obsolete include patch

 ...Floating-point-exception-in-tcplog_flowra.patch | 37 ++++++++++++++++++++++
 iptraf-ng-format-security.patch                    |  9 ------
 iptraf-ng-include.patch                            | 11 -------
 iptraf-ng.spec                                     |  9 +++---
 4 files changed, 42 insertions(+), 24 deletions(-)
---
diff --git a/iptraf-ng.spec b/iptraf-ng.spec
index d0e55e4..9bcf2c4 100644
--- a/iptraf-ng.spec
+++ b/iptraf-ng.spec
@@ -5,16 +5,17 @@ Summary(pt_BR.UTF-8):	Ferramenta baseada no console para monitoração de rede
 Summary(ru.UTF-8):	IPTraf - консольная программа мониторинга сетевого траффика
 Summary(uk.UTF-8):	IPTraf - консольна програма моніторингу трафіку в мережі
 Name:		iptraf-ng
-Version:	1.1.3.1
+Version:	1.1.4
 Release:	1
 License:	GPL
 Group:		Networking/Utilities
 Source0:	https://fedorahosted.org/releases/i/p/iptraf-ng/%{name}-%{version}.tar.gz
-# Source0-md5:	1a2c02944b0b012d6a3de96207610fa2
+# Source0-md5:	de27cfeeede96e2acfb0edc8439b034a
+Patch0:		%{name}-format-security.patch
+Patch1:		0001-BUGFIX-fix-Floating-point-exception-in-tcplog_flowra.patch
 URL:		https://fedorahosted.org/iptraf-ng/
-Patch0:		%{name}-include.patch
-Patch1:		%{name}-format-security.patch
 BuildRequires:	ncurses-ext-devel >= 5.4
+Obsoletes:	iptraf
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
diff --git a/0001-BUGFIX-fix-Floating-point-exception-in-tcplog_flowra.patch b/0001-BUGFIX-fix-Floating-point-exception-in-tcplog_flowra.patch
new file mode 100644
index 0000000..7a156b6
--- /dev/null
+++ b/0001-BUGFIX-fix-Floating-point-exception-in-tcplog_flowra.patch
@@ -0,0 +1,37 @@
+From 9b320138755542b927df650da0bd1e61ecaa41d7 Mon Sep 17 00:00:00 2001
+Message-Id: <9b320138755542b927df650da0bd1e61ecaa41d7.1378117677.git.npajkovs at redhat.com>
+From: Vitezslav Samel <vitezslav at samel.cz>
+Date: Thu, 29 Aug 2013 10:11:42 +0200
+Subject: [PATCH] BUGFIX: fix "Floating point exception" in
+ tcplog_flowrate_msg()
+
+commit 0d55bee "tcplog_flowrate_msg(): cleanup and fix") removed
+condition, which leads to zero division.
+
+Time diff between current time and ->conn_starttime is 0, because of
+rate_print updates happen in less then 1 sec and later on, we try to
+divide ->bcount by interval, which is 0, hencs zero division.
+
+Reported-by: Erik K. <ummeegge at ipfire.org>
+Signed-off-by: Vitezslav Samel <vitezslav at samel.cz>
+Signed-off-by: Nikola Pajkovsky <npajkovs at redhat.com>
+---
+ src/tcptable.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/tcptable.c b/src/tcptable.c
+index a4133d9..e217b19 100644
+--- a/src/tcptable.c
++++ b/src/tcptable.c
+@@ -437,6 +437,8 @@ static char *tcplog_flowrate_msg(struct tcptableent *entry, char *buf,
+ 				 size_t bufsize)
+ {
+ 	time_t interval = time(NULL) - entry->conn_starttime;
++	if (interval < 1)
++		interval = 1;
+ 
+ 	char rbuf[64];
+ 	rate_print(entry->bcount / interval, rbuf, sizeof(rbuf));
+-- 
+1.8.1.2
+
diff --git a/iptraf-ng-format-security.patch b/iptraf-ng-format-security.patch
index c8c5160..7b6bb93 100644
--- a/iptraf-ng-format-security.patch
+++ b/iptraf-ng-format-security.patch
@@ -11,15 +11,6 @@
  				doagain = 0;
 --- iptraf-ng-1.1.3.1/src/othptab.c.formatsec	2013-02-05 14:02:18.220828537 +0100
 +++ iptraf-ng-1.1.3.1/src/othptab.c	2013-02-05 14:09:36.732870661 +0100
-@@ -410,7 +410,7 @@ void printothpentry(struct othptable *ta
- 				break;
- 			}
- 
--			sprintf(scratchpad, inet_ntoa(saddr));
-+			sprintf(scratchpad, "%s", inet_ntoa(saddr));
- 			strcat(msgstring, scratchpad);
- 			wattrset(table->othpwin, ARPATTR);
- 			break;
 @@ -430,7 +430,7 @@ void printothpentry(struct othptable *ta
  				break;
  			}
diff --git a/iptraf-ng-include.patch b/iptraf-ng-include.patch
deleted file mode 100644
index 803577f..0000000
--- a/iptraf-ng-include.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- iptraf-ng-1.1.3.1/src/iptraf-ng-compat.h.tokenring	2013-02-05 13:54:53.008646938 +0100
-+++ iptraf-ng-1.1.3.1/src/iptraf-ng-compat.h	2013-02-05 13:55:25.261805541 +0100
-@@ -39,7 +39,7 @@
- #include <linux/if_ether.h>
- #include <linux/if_packet.h>
- #include <linux/if_fddi.h>
--#include <linux/if_tr.h>
-+#include <netinet/if_tr.h>
- #include <linux/types.h>
- #include <linux/isdn.h>
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/iptraf-ng.git/commitdiff/d206c84db8de9bd31368d489e96b1f99cc6e53d8



More information about the pld-cvs-commit mailing list