generated from smedev/Template-for-SMEServer-Contribs-Package
* Wed Jun 29 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.1.1-9.sme
- fix systemd unit chmod [SME: 11046]
This commit is contained in:
28
0001-Gracefuly-exit-upon-pcap_findalldevs-error.patch
Normal file
28
0001-Gracefuly-exit-upon-pcap_findalldevs-error.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
From 0abd4986f9d0b41cea18453e60fe2947e6eae047 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@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
|
||||
|
Reference in New Issue
Block a user