spec: update to 1.6.2

This commit also disables support for TPACKET_V3 mmaped packet capture

Resolves: #1131500,#1124174
This commit is contained in:
Michal Sekletar 2014-09-29 15:17:16 +02:00
parent 249f1511fb
commit 656dce8da1
9 changed files with 126 additions and 39 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ libpcap-1.1.1.tar.gz
/generate-tarball.sh
/libpcap-1.5.1.tar.gz
/libpcap-1.5.3.tar.gz
/libpcap-1.6.2.tar.gz

View File

@ -0,0 +1,27 @@
From 208bb414553d5444d82601e6fd4ca25fbb192998 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 29 Sep 2014 08:19:05 +0200
Subject: [PATCH 1/4] man: tcpdump and tcpslice have manpages in man8
Both should be run only by root, hence manpages for them should be located in
/usr/share/man/man8/
---
pcap.3pcap.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcap.3pcap.in b/pcap.3pcap.in
index f5a7e0c..f220e68 100644
--- a/pcap.3pcap.in
+++ b/pcap.3pcap.in
@@ -882,7 +882,7 @@ use an
script or some other configuration script to check whether the libpcap
1.0 APIs are available and use them only if they are.
.SH SEE ALSO
-autoconf(1), tcpdump(1), tcpslice(1), pcap-filter(@MAN_MISC_INFO@), pfconfig(8),
+autoconf(1), tcpdump(8), tcpslice(8), pcap-filter(@MAN_MISC_INFO@), pfconfig(8),
usermod(1M)
.SH AUTHORS
The original authors of libpcap are:
--
1.8.3.1

View File

@ -1,6 +1,22 @@
diff -up libpcap-1.3.0/pcap-config.in.multilib libpcap-1.3.0/pcap-config.in
--- libpcap-1.3.0/pcap-config.in.multilib 2012-03-29 14:57:32.000000000 +0200
+++ libpcap-1.3.0/pcap-config.in 2013-03-26 09:56:16.293324264 +0100
From 5b80ca39b1f01177e98c78bbc622dfda6f7a7e71 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 29 Sep 2014 08:27:15 +0200
Subject: [PATCH 2/4] pcap-config: mitigate multilib conflict
libdir path is different on 64bit and 32bit arches. Hence when installing both
multilib versions on the system yum complains about conflicting pcap-config
file.
Hence remove libdir references from pcap-config, libdir is in dynamic linker
path anyway.
---
pcap-config.in | 27 ++++++++-------------------
1 file changed, 8 insertions(+), 19 deletions(-)
diff --git a/pcap-config.in b/pcap-config.in
index 206be3b..75f2c9f 100644
--- a/pcap-config.in
+++ b/pcap-config.in
@@ -7,7 +7,6 @@
prefix="@prefix@"
exec_prefix="@exec_prefix@"
@ -67,3 +83,6 @@ diff -up libpcap-1.3.0/pcap-config.in.multilib libpcap-1.3.0/pcap-config.in
+ echo "-lpcap"
fi
fi
--
1.8.3.1

View File

@ -0,0 +1,28 @@
From b9fa92532328daad84766753422e8a21fd474e6f Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 29 Sep 2014 08:37:25 +0200
Subject: [PATCH 3/4] pcap-linux: apparently ctc interfaces on s390 has
ethernet DLT
---
pcap-linux.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pcap-linux.c b/pcap-linux.c
index 900ebbc..58292c3 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -3197,6 +3197,10 @@ activate_new(pcap_t *handle)
handle->linktype = DLT_LINUX_SLL;
}
+ /* Hack to make things work on s390 ctc interfaces */
+ if (strncmp("ctc", device, 3) == 0)
+ handle->linktype = DLT_EN10MB;
+
handlep->ifindex = iface_get_id(sock_fd, device,
handle->errbuf);
if (handlep->ifindex == -1) {
--
1.8.3.1

View File

@ -0,0 +1,35 @@
From 1ce0a55f93bdddb4bdf0956f094f4198f714a42c Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 29 Sep 2014 09:25:52 +0200
Subject: [PATCH 4/4] pcap-linux: don't use TPACKETV3 for memory mmapped
capture
There has been numerous reports from users complaining about changes in behavior
of libpcap when using libpcap compiled with TPACKETV3 support. Back out and
disable it.
See: https://github.com/the-tcpdump-group/libpcap/issues/380
See: https://github.com/the-tcpdump-group/libpcap/issues/364
Resolves: #1131500
---
pcap-linux.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/pcap-linux.c b/pcap-linux.c
index 58292c3..b3a7a51 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -193,9 +193,6 @@
* uses many ring related structs and macros */
# ifdef TPACKET_HDRLEN
# define HAVE_PACKET_RING
-# ifdef TPACKET3_HDRLEN
-# define HAVE_TPACKET3
-# endif /* TPACKET3_HDRLEN */
# ifdef TPACKET2_HDRLEN
# define HAVE_TPACKET2
# else /* TPACKET2_HDRLEN */
--
1.8.3.1

View File

@ -1,12 +0,0 @@
diff -up libpcap/pcap.3pcap.in.man libpcap/pcap.3pcap.in
--- libpcap/pcap.3pcap.in.man 2009-07-03 06:01:12.000000000 +0200
+++ libpcap/pcap.3pcap.in 2009-07-03 15:00:12.000000000 +0200
@@ -363,7 +363,7 @@ use an
script or some other configuration script to check whether the libpcap
1.0 APIs are available and use them only if they are.
.SH SEE ALSO
-autoconf(1), tcpdump(1), tcpslice(1), pcap-filter(@MAN_MISC_INFO@), pfconfig(8),
+autoconf(1), tcpdump(8), tcpslice(8), pcap-filter(@MAN_MISC_INFO@), pfconfig(8),
usermod(1M)
.SH AUTHORS
The original authors of libpcap are:

View File

@ -1,14 +0,0 @@
diff -up libpcap-1.5.0/pcap-linux.c.s390 libpcap-1.5.0/pcap-linux.c
--- libpcap-1.5.0/pcap-linux.c.s390 2013-11-08 08:05:02.608387300 +0100
+++ libpcap-1.5.0/pcap-linux.c 2013-11-08 08:08:49.597405024 +0100
@@ -3181,6 +3181,10 @@ activate_new(pcap_t *handle)
handle->linktype = DLT_LINUX_SLL;
}
+ /* Hack to make things work on s390 ctc interfaces */
+ if (strncmp("ctc", device, 3) == 0)
+ handle->linktype = DLT_EN10MB;
+
handlep->ifindex = iface_get_id(sock_fd, device,
handle->errbuf);
if (handlep->ifindex == -1) {

View File

@ -1,7 +1,7 @@
Name: libpcap
Epoch: 14
Version: 1.5.3
Release: 5%{?dist}
Version: 1.6.2
Release: 1%{?dist}
Summary: A system-independent interface for user-level packet capture
Group: Development/Libraries
License: BSD with advertising
@ -9,9 +9,11 @@ URL: http://www.tcpdump.org
BuildRequires: glibc-kernheaders >= 2.2.0 bison flex bluez-libs-devel
Source: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz
Patch1: libpcap-man.patch
Patch2: libpcap-multilib.patch
Patch3: libpcap-s390.patch
Patch0001: 0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch
Patch0002: 0002-pcap-config-mitigate-multilib-conflict.patch
Patch0003: 0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch
Patch0004: 0004-pcap-linux-don-t-use-TPACKETV3-for-memory-mmapped-ca.patch
%description
Libpcap provides a portable framework for low-level network
@ -44,10 +46,7 @@ resources needed for developing libpcap applications.
%prep
%setup -q
%patch1 -p1 -b .man
%patch2 -p1 -b .multilib
%patch3 -p1 -b .s390
%autopatch -p1
#sparc needs -fPIC
%ifarch %{sparc}
@ -84,6 +83,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a
%{_mandir}/man5/pcap*.5*
%changelog
* Mon Sep 29 2014 Michal Sekletar <msekleta@redhat.com> - 14:1.6.2-1
- update to 1.6.2 (#1124174)
- disable TPACKET_V3 support (#1131500)
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:1.5.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

View File

@ -1 +1 @@
7e7321fb3aff2f2bb05c8229f3795d4a libpcap-1.5.3.tar.gz
5f14191c1a684a75532c739c2c4059fa libpcap-1.6.2.tar.gz