rpms/bandwidthd/devel 0001-Gracefuly-exit-upon-pcap_findalldevs-error.patch, NONE, 1.1 bandwidthd.spec, 1.5, 1.6 import.log, 1.3, 1.4
Ján ONDREJ
ondrejj at fedoraproject.org
Wed Dec 9 08:48:19 UTC 2009
Author: ondrejj
Update of /cvs/pkgs/rpms/bandwidthd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21161/devel
Modified Files:
bandwidthd.spec import.log
Added Files:
0001-Gracefuly-exit-upon-pcap_findalldevs-error.patch
Log Message:
Fix crash when no interfaces found.
0001-Gracefuly-exit-upon-pcap_findalldevs-error.patch:
bandwidthd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- NEW FILE 0001-Gracefuly-exit-upon-pcap_findalldevs-error.patch ---
>From 0abd4986f9d0b41cea18453e60fe2947e6eae047 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak at v3.sk>
Date: Wed, 9 Dec 2009 08:54:41 +0100
Subject: [PATCH] Gracefuly exit upon pcap_findalldevs() error
---
bandwidthd.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/bandwidthd.c b/bandwidthd.c
index a0d18d0..d69737f 100644
--- a/bandwidthd.c
+++ b/bandwidthd.c
@@ -320,6 +320,11 @@ int main(int argc, char **argv)
#ifdef HAVE_PCAP_FINDALLDEVS
pcap_findalldevs(&Devices, Error);
+ if (Devices == NULL)
+ {
+ printf("Can't find network devices: %s", Error);
+ exit(1);
+ }
if (config.dev == NULL && Devices->name)
config.dev = strdup(Devices->name);
if (ListDevices)
--
1.6.5.3
Index: bandwidthd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bandwidthd/devel/bandwidthd.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- bandwidthd.spec 24 Jul 2009 17:49:44 -0000 1.5
+++ bandwidthd.spec 9 Dec 2009 08:48:19 -0000 1.6
@@ -3,7 +3,7 @@
Name: bandwidthd
Version: 2.0.1
-Release: 13%{?dist}
+Release: 15%{?dist}
Summary: Tracks network usage and builds html and graphs
Group: System Environment/Daemons
@@ -13,6 +13,7 @@ Source0: http://downloads.sourcef
Source1: %{name}
Patch0: bandwidthd-destdir.patch
Patch1: bandwidthd-pgsql.patch
+Patch2: http://v3.sk/~lkundrak/0001-Gracefuly-exit-upon-pcap_findalldevs-error.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, gd-devel, libpng-devel
%{?!_without_pgsql:BuildRequires: postgresql-devel}
@@ -46,6 +47,7 @@ is graphed on a Celeron 450 every 10 min
%setup -q
%patch0 -p1 -b .dest
%patch1 -p0 -b .pgsql
+%patch2 -p1 -b .nodevs
%build
@@ -100,6 +102,9 @@ fi
%changelog
+* Wed Dec 09 2009 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-15
+- Applied patch from lkundrak to do not hang when no devices found. bz#537073
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
Index: import.log
===================================================================
RCS file: /cvs/pkgs/rpms/bandwidthd/devel/import.log,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- import.log 14 Dec 2008 12:17:20 -0000 1.3
+++ import.log 9 Dec 2009 08:48:19 -0000 1.4
@@ -1,3 +1,4 @@
bandwidthd-2_0_1-8_fc10:HEAD:bandwidthd-2.0.1-8.fc10.src.rpm:1229249844
bandwidthd-2_0_1-9_fc10:HEAD:bandwidthd-2.0.1-9.fc10.src.rpm:1229252545
bandwidthd-2_0_1-11_fc10:HEAD:bandwidthd-2.0.1-11.fc10.src.rpm:1229257014
+bandwidthd-2_0_1-15_fc12:HEAD:bandwidthd-2.0.1-15.fc12.src.rpm:1260348483
More information about the scm-commits
mailing list