Accepting request 390474 from Base:System

1

OBS-URL: https://build.opensuse.org/request/show/390474
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libpcap?expand=0&rev=50
This commit is contained in:
Dominique Leuenberger 2016-04-22 14:17:21 +00:00 committed by Git OBS Bridge
commit a62634260e
3 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,25 @@
Index: libpcap-1.7.3/pcap-linux.c
===================================================================
--- libpcap-1.7.3.orig/pcap-linux.c
+++ libpcap-1.7.3/pcap-linux.c
@@ -1425,16 +1425,10 @@ pcap_activate_linux(pcap_t *handle)
}
}
else if (ret == 0) {
- /* Non-fatal error; try old way */
- if ((ret = activate_old(handle)) != 1) {
- /*
- * Both methods to open the packet socket failed.
- * Tidy up and report our failure (handle->errbuf
- * is expected to be set by the functions above).
- */
- status = ret;
- goto fail;
- }
+ snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
+ "af_packet module unavailable, missing a reboot to new kernel?");
+ status = PCAP_ERROR;
+ goto fail;
}
/*

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sun Apr 17 02:42:52 UTC 2016 - crrodriguez@opensuse.org
- libpcap-no-old-socket.patch: never fallback to the obsolete
SOCK_PACKET (kernel < 2.2) interface, this still happens
for example, when you update the kernel, run iftop and
the old kernel af_packet module wasn't loaded, program fails
and the kernel prints "iftop uses obsolete (PF_INET,SOCK_PACKET)"
-------------------------------------------------------------------
Sun Jun 21 04:41:13 UTC 2015 - crrodriguez@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package libpcap
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -35,6 +35,7 @@ Patch1: libpcap-1.0.0-pcap-bpf.patch
Patch2: libpcap-1.0.0-ppp.patch
Patch3: libpcap-1.0.0-s390.patch
Patch4: libpcap-ocloexec.patch
Patch5: libpcap-no-old-socket.patch
BuildRequires: automake
BuildRequires: bison
BuildRequires: dbus-1-devel
@ -105,6 +106,7 @@ libpcap static libraries
%patch2
%patch3
%patch4 -p1
%patch5 -p1
%build
%ifarch %sparc
pic="PIC"