Hello community,

here is the log from the commit of package iptraf for openSUSE:Factory checked 
in at 2013-09-23 09:33:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/iptraf (Old)
 and      /work/SRC/openSUSE:Factory/.iptraf.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "iptraf"

Changes:
--------
--- /work/SRC/openSUSE:Factory/iptraf/iptraf.changes    2013-08-10 
18:28:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.iptraf.new/iptraf.changes       2013-09-23 
09:33:56.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Sep 18 20:41:58 UTC 2013 - [email protected]
+
+- fix "Floating point exception" in tcplog_flowrate_msg(), adds
+  iptraf-ng-1.1.4-fix-Floating-point-exception-in-tcplog_flowra.patch
+  from Fedora [bnc#841156]
+
+-------------------------------------------------------------------

New:
----
  iptraf-ng-1.1.4-fix-Floating-point-exception-in-tcplog_flowra.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ iptraf.spec ++++++
--- /var/tmp/diff_new_pack.VmPzoB/_old  2013-09-23 09:33:56.000000000 +0200
+++ /var/tmp/diff_new_pack.VmPzoB/_new  2013-09-23 09:33:56.000000000 +0200
@@ -27,6 +27,7 @@
 #Git-Clone:    git://git.fedorahosted.org/git/iptraf-ng
 #DL-URL:       
http://fedorahosted.org/releases/i/p/iptraf-ng/iptraf-ng-%version.tar.gz
 Source:         %name-ng-%version.tar.xz
+Patch1:         
iptraf-ng-1.1.4-fix-Floating-point-exception-in-tcplog_flowra.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  ncurses-devel
 BuildRequires:  xz
@@ -56,6 +57,7 @@
 
 %prep
 %setup -qn %name-ng-%version
+%patch1 -p1
 
 %build
 %configure

++++++ iptraf-ng-1.1.4-fix-Floating-point-exception-in-tcplog_flowra.patch 
++++++
>From 9b320138755542b927df650da0bd1e61ecaa41d7 Mon Sep 17 00:00:00 2001
Message-Id: 
<9b320138755542b927df650da0bd1e61ecaa41d7.1378117677.git.npajk...@redhat.com>
From: Vitezslav Samel <[email protected]>
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. <[email protected]>
Signed-off-by: Vitezslav Samel <[email protected]>
Signed-off-by: Nikola Pajkovsky <[email protected]>
---
 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

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to