Compare commits

...

No commits in common. "c8" and "c10s" have entirely different histories.
c8 ... c10s

12 changed files with 219 additions and 144 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

25
.gitignore vendored
View File

@ -1 +1,24 @@
SOURCES/libpcap-1.9.1.tar.gz
libpcap-1.1.1.tar.gz
/libpcap-1.2.0.tar.gz
/libpcap-1.2.1.tar.gz
/libpcap-1.3.0.tar.gz
/libpcap-1.4.0.tar.gz
/libpcap-1.5.0-20131108git459712e.tar.gz
/generate-tarball.sh
/libpcap-1.5.1.tar.gz
/libpcap-1.5.3.tar.gz
/libpcap-1.6.2.tar.gz
/libpcap-1.7.2.tar.gz
/libpcap-1.7.3.tar.gz
/libpcap-1.7.4.tar.gz
/libpcap-1.8.0.tar.gz
/libpcap-1.8.1.tar.gz
/libpcap-1.9.0.tar.gz
/libpcap-1.9.1.tar.gz
/libpcap-1.10.0.tar.gz
/libpcap-1.10.1.tar.gz
/libpcap-1.10.2.tar.gz
/libpcap-1.10.3.tar.gz
/libpcap-1.10.3.tar.gz.sig
/libpcap-1.10.4.tar.gz.sig
/libpcap-1.10.4.tar.gz

View File

@ -1 +0,0 @@
04d6e619defad5bb17af15f6d2304e79b649786c SOURCES/libpcap-1.9.1.tar.gz

View File

@ -10,18 +10,19 @@ Both should be run only by root, hence manpages for them should be located in
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcap.3pcap.in b/pcap.3pcap.in
index f5a7e0c..f220e68 100644
index 492c227..46a2a4b 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
@@ -1025,8 +1025,8 @@ 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(@MAN_ADMIN_COMMANDS@)
.SH AUTHORS
The original authors of libpcap are:
.BR autoconf (1),
-.BR tcpdump (1),
-.BR tcpslice (1),
+.BR tcpdump (8),
+.BR tcpslice (8),
.BR \%pcap-filter (@MAN_MISC_INFO@),
.BR pfconfig (8),
.BR usermod (@MAN_ADMIN_COMMANDS@)
--
1.8.3.1

View File

@ -12,45 +12,30 @@ path anyway.
---
pcap-config.in | 27 ++++++++-------------------
1 file changed, 8 insertions(+), 19 deletions(-)
--
1.8.3.1
diff --git a/pcap-config.in b/pcap-config.in
index 206be3b..75f2c9f 100644
index 6039ef3..72297bf 100644
--- a/pcap-config.in
+++ b/pcap-config.in
@@ -7,7 +7,6 @@
@@ -11,7 +11,6 @@
prefix="@prefix@"
exec_prefix="@exec_prefix@"
includedir="@includedir@"
-libdir="@libdir@"
V_RPATH_OPT="@V_RPATH_OPT@"
LIBS="@LIBS@"
PACKAGE_NAME="@PACKAGE_NAME@"
@@ -36,16 +35,6 @@ do
esac
shift
done
-if [ "$V_RPATH_OPT" != "" ]
-then
- #
- # If libdir isn't /usr/lib, add it to the run-time linker path.
- #
- if [ "$libdir" != "/usr/lib" ]
- then
- RPATH=$V_RPATH_OPT$libdir
- fi
-fi
if [ "$static" = 1 ]
then
#
@@ -54,16 +43,16 @@ then
LIBS_STATIC="@LIBS_STATIC@"
VERSION="@PACKAGE_VERSION@"
@@ -90,16 +89,16 @@ then
#
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
then
- echo "-I$includedir -L$libdir -lpcap $LIBS"
- echo "-I$includedir $LPATH -l@PACKAGE_NAME@ $LIBS_STATIC"
+ echo "-lpcap @LIBS@"
elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
then
- echo "-I$includedir -L$libdir $LIBS"
- echo "-I$includedir $LPATH $LIBS_STATIC"
+ echo "@LIBS@"
elif [ "$show_cflags" = 1 ]
then
@ -58,20 +43,20 @@ index 206be3b..75f2c9f 100644
+ echo ""
elif [ "$show_libs" = 1 ]
then
- echo "-L$libdir -lpcap $LIBS"
- echo "$LPATH -l@PACKAGE_NAME@ $LIBS_STATIC"
+ echo "-lpcap @LIBS@"
elif [ "$show_additional_libs" = 1 ]
then
echo "$LIBS"
@@ -75,15 +64,15 @@ else
echo "$LIBS_STATIC"
@@ -117,16 +116,16 @@ then
#
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
then
- echo "-I$includedir -L$libdir $RPATH -l$PACKAGE_NAME"
- echo "-I$includedir $LPATH -l@PACKAGE_NAME@ $LIBS"
+ echo "-lpcap"
elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
then
- echo "-I$includedir"
- echo "-I$includedir $LPATH $LIBS"
+ echo ""
elif [ "$show_cflags" = 1 ]
then
@ -79,10 +64,8 @@ index 206be3b..75f2c9f 100644
+ echo ""
elif [ "$show_libs" = 1 ]
then
- echo "-L$libdir $RPATH -l$PACKAGE_NAME"
- echo "$LPATH -l@PACKAGE_NAME@ $LIBS"
+ echo "-lpcap"
fi
fi
--
1.8.3.1
elif [ "$show_additional_libs" = 1 ]
then
echo "$LIBS"

View File

@ -13,7 +13,7 @@ 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 */

View File

@ -1,66 +0,0 @@
From 907070918d5e81a515315b395f334e52589fe0fb Mon Sep 17 00:00:00 2001
From: Guy Harris <guy@alum.mit.edu>
Date: Wed, 18 Dec 2019 15:06:53 -0800
Subject: [PATCH] Check for invalid IPv4 addresses.
This should fix GitHub issue #893.
---
gencode.c | 9 ++++++++-
nametoaddr.c | 9 ++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/gencode.c b/gencode.c
index bdc35e646..040a55315 100644
--- a/gencode.c
+++ b/gencode.c
@@ -6947,11 +6947,15 @@ gen_mcode(compiler_state_t *cstate, const char *s1, const char *s2,
return (NULL);
nlen = __pcap_atoin(s1, &n);
+ if (nlen < 0)
+ bpf_error(cstate, "invalid IPv4 address '%s'", s1);
/* Promote short ipaddr */
n <<= 32 - nlen;
if (s2 != NULL) {
mlen = __pcap_atoin(s2, &m);
+ if (mlen < 0)
+ bpf_error(cstate, "invalid IPv4 address '%s'", s2);
/* Promote short ipaddr */
m <<= 32 - mlen;
if ((n & ~m) != 0)
@@ -7009,8 +7013,11 @@ gen_ncode(compiler_state_t *cstate, const char *s, bpf_u_int32 v, struct qual q)
vlen = __pcap_atodn(s, &v);
if (vlen == 0)
bpf_error(cstate, "malformed decnet address '%s'", s);
- } else
+ } else {
vlen = __pcap_atoin(s, &v);
+ if (vlen < 0)
+ bpf_error(cstate, "invalid IPv4 address '%s'", s);
+ }
switch (q.addr) {
diff --git a/nametoaddr.c b/nametoaddr.c
index 53070a285..13bf4c683 100644
--- a/nametoaddr.c
+++ b/nametoaddr.c
@@ -674,8 +674,15 @@ __pcap_atoin(const char *s, bpf_u_int32 *addr)
len = 0;
for (;;) {
n = 0;
- while (*s && *s != '.')
+ while (*s && *s != '.') {
+ if (n > 25) {
+ /* The result will be > 255 */
+ return -1;
+ }
n = n * 10 + *s++ - '0';
+ }
+ if (n > 255)
+ return -1;
*addr <<= 8;
*addr |= n & 0xff;
len += 8;

1
ci.fmf Normal file
View File

@ -0,0 +1 @@
resultsdb-testcase: separate

25
gating.yaml Normal file
View File

@ -0,0 +1,25 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
#Rawhide
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
#gating rhel
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-public.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}

View File

@ -1,24 +1,29 @@
Name: libpcap
Epoch: 14
Version: 1.9.1
Release: 5%{?dist}
Version: 1.10.4
Release: 7%{?dist}
Summary: A system-independent interface for user-level packet capture
License: BSD with advertising
URL: http://www.tcpdump.org
License: ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC
URL: https://www.tcpdump.org/
BuildRequires: make
BuildRequires: bison
BuildRequires: bluez-libs-devel
BuildRequires: flex
BuildRequires: gcc
BuildRequires: git
BuildRequires: glibc-kernheaders >= 2.2.0
#rdma-core-devel not available on arm
%ifnarch %{arm}
BuildRequires: rdma-core-devel
%endif
Source: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz
Source0: https://www.tcpdump.org/release/%{name}-%{version}.tar.gz
Source1: https://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig
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-invalid-IPv4-address.patch
%description
Libpcap provides a portable framework for low-level network
@ -34,7 +39,7 @@ on your network.
%package devel
Summary: Libraries and header files for the libpcap library
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description devel
Libpcap provides a portable framework for low-level network
@ -58,24 +63,26 @@ sed -i -e 's|-fpic|-fPIC|g' configure
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%ifarch %{arm}
%configure
%else
%configure --enable-rdma
make %{?_smp_mflags}
%endif
%make_build
%install
make DESTDIR=$RPM_BUILD_ROOT install
%make_install
rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a
%ldconfig_scriptlets
%files
%defattr(-,root,root)
%license LICENSE
%doc README.md CHANGES CREDITS
%{_libdir}/libpcap.so.*
%{_mandir}/man7/pcap*.7*
%files devel
%defattr(-,root,root)
%{_bindir}/pcap-config
%{_includedir}/pcap*.h
%{_includedir}/pcap
@ -86,36 +93,99 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a
%{_mandir}/man5/pcap*.5*
%changelog
* Mon Jan 18 2021 Michal Ruprich <mruprich@redhat.com> - 14:1.9.1-5
- Resolves: #1743650 - Enable inbox support for sniffing offloaded RDMA traffic with tcpdump
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 14:1.10.4-7
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri May 22 2020 Michal Ruprich <michalruprich@gmail.com> - 14:1.9.1-4
- Related: #1806422 - Building libpcap to side-tag for tcpdump
* Tue Jul 02 2024 František Hrdina <fhrdina@redhat.com> - 14:1.10.4-6
- Fix broken gating
* Fri May 22 2020 Michal Ruprich <michalruprich@gmail.com> - 14:1.9.1-3
- Related: #1743650 - reverting rdma changes due to unresolved dependency loop
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 14:1.10.4-5
- Bump release for June 2024 mass rebuild
* Wed May 06 2020 Michal Ruprich <michalruprich@gmail.com> - 14:1.9.1-2
- Related: #1806422 - Building libpcap to side-tag for tcpdump
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.10.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Apr 09 2020 Michal Ruprich <michalruprich@gmail.com> - 14:1.9.1-1
- Resolves: #1806422 - rebase libpcap to version 1.9.1
- Resolves: #1743650 - [RFE] enable inbox support for sniffing offloaded (RDMA) traffic with tcpdump
- Resolves: #1785330 - Invalid IPv4 addresses are accepted without reporting even a warning
- Resolves: #1792208 - Resource exhaustion while PHB header length validation
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.10.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 03 2019 Michal Ruprich <mruprich@redhat.com> - 14:1.9.0-3
- Resolves: #1708397 - Move libpcap.pc to libpcap-devel
- Removing obsolete group tag
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.10.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed May 22 2019 Michal Ruprich <mruprich@redhat.com> - 14:1.9.0-2
- Resolves: #1680929 - libpcap changes blocked until gating tests are added
* Wed Apr 12 2023 Michal Ruprich <mruprich@redhat.com> - 14:1.10.4-1
- New version 1.10.4
* Tue Mar 21 2023 Michal Ruprich <mruprich@redhat.com> - 14:1.10.3-3
- SPDX migration
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.10.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Jan 17 2023 Michal Ruprich <mruprich@redhat.com> - 14:1.10.3-1
- New version 1.10.3
* Tue Jan 03 2023 Michal Ruprich <mruprich@redhat.com> - 14:1.10.2-1
- New version 1.10.2
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.10.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.10.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.10.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 10 2021 Michal Ruprich <mruprich@redhat.com> - 14:1.10.1-1
- New version 1.10.1
* Thu Feb 11 2021 Michal Ruprich <mruprich@redhat.com> - 14:1.10.0-1
- New version 1.10.0
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.9.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Oct 12 2020 Michal Ruprich <mruprich@redhat.com> - 14:1.9.1-6
- Using make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.9.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri May 15 2020 Michal Ruprich <michalruprich@gmail.com> - 14:1.9.1-4
- Enabling rdma support in libpcap
* Mon Feb 24 2020 Michal Ruprich <mruprich@redhat.com> - 14:1.9.1-3
- libpcap should print an error on wrong IPv4 address
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Oct 11 2019 Michal Ruprich <mruprich@redhat.com> - 14:1.9.1-1
- New version 1.9.1
- Fix for CVE-2018-16301, CVE-2019-15161, CVE-2019-15162, CVE-2019-15163, CVE-2019-15164, CVE-2019-15165
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.9.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Aug 13 2018 Peter Robinson <pbrobinson@fedoraproject.org> 14:1.9.0-2
- pkgconfig file belong in devel package
- drop obsolete group in spec
* Wed Aug 01 2018 Michal Ruprich <mruprich@redhat.com> - 14:1.9.0-1
- New version 1.9.0
* Thu Jun 07 2018 Michal Ruprich <mruprich@redhat.com> - 14:1.8.1-9
- Adding support for AF_VSOCK (rhbz#1587833)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.8.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jun 06 2018 Michal Ruprich <mruprich@redhat.com> - 14:1.8.1-10
- Adding support for AF_VSOCK
* Tue Feb 20 2018 Martin Sehnoutka <msehnout@redhat.com> - 14:1.8.1-9
- Add gcc to BuildRequires
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.8.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

36
plans.fmf Normal file
View File

@ -0,0 +1,36 @@
/tier1-internal:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/libpcap.git
name: /plans/tier1/internal
/tier1-public:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/libpcap.git
name: /plans/tier1/public
/tier2-tier3-internal:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/libpcap.git
name: /plans/tier2-tier3/internal
/tier2-tier3-public:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/libpcap.git
name: /plans/tier2-tier3/public
/others-internal:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/libpcap.git
name: /plans/others/internal
/others-public:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/libpcap.git
name: /plans/others/public

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (libpcap-1.10.4.tar.gz.sig) = 34aa401c2e162d708c61b78b445af2fe4ddc0e57de9124b5cc3a05679ffbc3834088160f83892d827e25c65b33313fe71aa73c2de09935d387252ab315ca5ee1
SHA512 (libpcap-1.10.4.tar.gz) = 1f6d6ddd07dae7c557054cb246437ecdaf39d579592a5a6bdf1144eea6cb5a779ac4ca647cfed11ec1b0bb18efc63b845444e497070bacefaaed19a5787ae5e1