forked from pool/iptraf-ng
Accepting request 813275 from network:utilities
- Update to release 1.2.0 OBS-URL: https://build.opensuse.org/request/show/813275 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iptraf-ng?expand=0&rev=2
This commit is contained in:
commit
140fd9576b
@ -0,0 +1,40 @@
|
||||
From 3eca8d3c345f6fff90111cac7ef707da7cb7cb80 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Wed, 10 Jun 2020 17:04:00 +0200
|
||||
Subject: [PATCH] Revert "TPACKET_V3: mlock() mmap()ed address space into RAM"
|
||||
References: https://github.com/iptraf-ng/iptraf-ng/issues/26
|
||||
|
||||
This reverts commit 043b0387fbd11670b8b09fc5bde168345648d32d.
|
||||
---
|
||||
src/capt-mmap-v3.c | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/capt-mmap-v3.c b/src/capt-mmap-v3.c
|
||||
index 1b2b652..fd0bf50 100644
|
||||
--- a/src/capt-mmap-v3.c
|
||||
+++ b/src/capt-mmap-v3.c
|
||||
@@ -101,8 +101,6 @@ static void capt_cleanup_mmap_v3(struct capt *capt)
|
||||
struct capt_data_mmap_v3 *data = capt->priv;
|
||||
|
||||
free(data->pbds);
|
||||
-
|
||||
- munlock(data->mmap, data->mmap_size);
|
||||
munmap(data->mmap, data->mmap_size);
|
||||
|
||||
memset(data, 0, sizeof(*data));
|
||||
@@ -140,11 +138,7 @@ int capt_setup_mmap_v3(struct capt *capt)
|
||||
void *map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, capt->fd, 0);
|
||||
if (map == MAP_FAILED)
|
||||
return -1;
|
||||
-
|
||||
- if (mlock(map, size) != 0) {
|
||||
- munmap(map, size);
|
||||
- return -1;
|
||||
- }
|
||||
+ /* mlock() ??? */
|
||||
|
||||
struct capt_data_mmap_v3 *data = xmallocz(sizeof(struct capt_data_mmap_v3));
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 96b7a5e17dce341b083ae802501d5c1c1966a0a9 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Mon, 6 Jan 2020 16:40:58 +0100
|
||||
Subject: [PATCH] ifstats: make sort-by-ifname the only mode of operation
|
||||
|
||||
https://github.com/iptraf-ng/iptraf-ng/pull/2
|
||||
|
||||
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
|
||||
---
|
||||
src/ifstats.c | 13 +++----------
|
||||
src/options.c | 50 ++++++++++++++++++++------------------------------
|
||||
src/options.h | 2 +-
|
||||
3 files changed, 24 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/src/ifstats.c b/src/ifstats.c
|
||||
index 0ae9b08..f871fc7 100644
|
||||
--- a/src/ifstats.c
|
||||
+++ b/src/ifstats.c
|
||||
@@ -194,7 +194,7 @@ static void initiflist(struct iflist **list)
|
||||
|
||||
/* make the linked list sorted by ifindex */
|
||||
struct iflist *cur = *list, *last = NULL;
|
||||
- while (cur != NULL && cur->ifindex < ifindex) {
|
||||
+ while (cur != NULL && strcmp(cur->ifname, ifname) < 0) {
|
||||
last = cur;
|
||||
cur = cur->next_entry;
|
||||
}
|
@ -1,75 +0,0 @@
|
||||
From: Vitezslav Samel <vitezslav@samel.cz>
|
||||
Date: Thu, 17 Apr 2014 14:24:25 +0200
|
||||
Subject: build: use wide version of -lpanel when needed
|
||||
Patch-mainline: yes
|
||||
Git-commit: 1a009a230aacaa87d24fe75a257ffe8d57313116
|
||||
References: bnc#940207
|
||||
|
||||
When linking with -lncurses[56]w we need to link with -lpanelw.
|
||||
|
||||
Signed-off-by: Vitezslav Samel <vitezslav@samel.cz>
|
||||
Signed-off-by: Nikola Pajkovsky <n.pajkovsky@gmail.com>
|
||||
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
||||
---
|
||||
Makefile | 22 ++++++++++++++--------
|
||||
1 file changed, 14 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 958b0fbeec0f..59b7c6f90298 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -218,7 +218,7 @@ ifdef NEEDS_NCURSESW5
|
||||
NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null)
|
||||
NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null)
|
||||
ifndef NO_PANEL
|
||||
- NCURSES_LDFLAGS += -lpanel
|
||||
+ NCURSES_LDFLAGS += -lpanelw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -238,7 +238,7 @@ ifdef NEEDS_NCURSESW6
|
||||
NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null)
|
||||
NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null)
|
||||
ifndef NO_PANEL
|
||||
- NCURSES_LDFLAGS += -lpanel
|
||||
+ NCURSES_LDFLAGS += -lpanelw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -248,21 +248,27 @@ ifndef NCURSES_LDFLAGS
|
||||
ifneq ($(shell ncursesw6-config --libs 2>/dev/null),)
|
||||
NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null)
|
||||
NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null)
|
||||
+ ifndef NO_PANEL
|
||||
+ NCURSES_LDFLAGS += -lpanelw
|
||||
+ endif
|
||||
else ifneq ($(shell ncurses6-config --libs 2>/dev/null),)
|
||||
NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null)
|
||||
NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null)
|
||||
+ ifndef NO_PANEL
|
||||
+ NCURSES_LDFLAGS += -lpanel
|
||||
+ endif
|
||||
else ifneq ($(shell ncursesw5-config --libs 2>/dev/null),)
|
||||
NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null)
|
||||
NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null)
|
||||
+ ifndef NO_PANEL
|
||||
+ NCURSES_LDFLAGS += -lpanelw
|
||||
+ endif
|
||||
else ifneq ($(shell ncurses5-config --libs 2>/dev/null),)
|
||||
NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null)
|
||||
NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null)
|
||||
- endif
|
||||
-
|
||||
- ifneq ($(NCURSES_LDFLAGS),)
|
||||
- ifndef NO_PANEL
|
||||
- NCURSES_LDFLAGS += -lpanel
|
||||
- endif
|
||||
+ ifndef NO_PANEL
|
||||
+ NCURSES_LDFLAGS += -lpanel
|
||||
+ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 9b320138755542b927df650da0bd1e61ecaa41d7 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <9b320138755542b927df650da0bd1e61ecaa41d7.1378117677.git.npajkovs@redhat.com>
|
||||
From: Vitezslav Samel <vitezslav@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@ipfire.org>
|
||||
Signed-off-by: Vitezslav Samel <vitezslav@samel.cz>
|
||||
Signed-off-by: Nikola Pajkovsky <npajkovs@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
|
||||
|
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 10 14:44:22 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 1.2.0
|
||||
* A set of minor bugfixes.
|
||||
* Fix CPU hogging if the interface gets removed [rhbz#1572750]
|
||||
- Drop iptraf-ng-1.1.4-fix-Floating-point-exception-in-tcplog_flowra.patch,
|
||||
build-use-wide-version-of-lpanel-when-needed.patch,
|
||||
0001-ifstats-make-sort-by-ifname-the-only-mode-of-operati.patch
|
||||
(merged)
|
||||
- Add 0001-Revert-TPACKET_V3-mlock-mmap-ed-address-space-into-R.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 12 14:45:33 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: iptraf-ng
|
||||
Version: 1.1.4
|
||||
Version: 1.2.0
|
||||
Release: 0
|
||||
Summary: TCP/IP Network Monitor
|
||||
License: GPL-2.0-or-later
|
||||
@ -25,9 +25,7 @@ Group: Productivity/Networking/Diagnostic
|
||||
URL: https://github.com/iptraf-ng/iptraf-ng/
|
||||
|
||||
Source: https://github.com/iptraf-ng/iptraf-ng/archive/v%version.tar.gz
|
||||
Patch1: iptraf-ng-1.1.4-fix-Floating-point-exception-in-tcplog_flowra.patch
|
||||
Patch2: build-use-wide-version-of-lpanel-when-needed.patch
|
||||
Patch3: 0001-ifstats-make-sort-by-ifname-the-only-mode-of-operati.patch
|
||||
Patch1: 0001-Revert-TPACKET_V3-mlock-mmap-ed-address-space-into-R.patch
|
||||
Obsoletes: iptraf < 4
|
||||
# Just pick a number that is >3
|
||||
Provides: iptraf = 4
|
||||
@ -45,12 +43,10 @@ breakdowns, and LAN station packet and byte counts.
|
||||
%autosetup -n %name-%version -p1
|
||||
|
||||
%build
|
||||
if [ ! -e configure ]; then autoreconf -fi; fi
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
make %{?_smp_mflags} CFLAGS="%optflags -D_GNU_SOURCE" V=1
|
||||
|
||||
%install
|
||||
%make_install
|
||||
%make_install prefix="%_prefix" V=1
|
||||
b="%buildroot"
|
||||
install -dm 0755 "$b/%_localstatedir/lib/iptraf-ng"
|
||||
ln -s iptraf-ng "$b/%_sbindir/iptraf"
|
||||
@ -58,9 +54,7 @@ ln -s iptraf-ng.8 "$b/%_mandir/man8/iptraf.8"
|
||||
|
||||
%files
|
||||
%_sbindir/iptraf*
|
||||
%_sbindir/rvnamed*
|
||||
%_mandir/man8/iptraf*
|
||||
%_mandir/man8/rvnamed*
|
||||
%_localstatedir/lib/iptraf-ng
|
||||
|
||||
%changelog
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:16b9b05bf5d3725d86409b901696639ad46944d02de6def87b1ceae5310dd35c
|
||||
size 556843
|
3
v1.2.0.tar.gz
Normal file
3
v1.2.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9725115e501d083674d50a7686029d3a08f920abd35c9a2d4a28b5ddb782417f
|
||||
size 324969
|
Loading…
Reference in New Issue
Block a user