Compare commits
36 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14117825e6 | ||
|
|
27a66461c5 | ||
|
|
3d952b57a6 | ||
|
|
e81c726cb8 | ||
|
|
6af13c8c8e | ||
|
|
7b46e6148d | ||
|
|
beb90bd4f9 | ||
|
|
e0f464424e | ||
|
|
b350a3983c | ||
|
|
c66c962c45 | ||
|
|
a61dc00337 | ||
|
|
a966910798 | ||
|
|
dfb9c27b13 | ||
|
|
efd0d56be9 | ||
|
|
a7edd2c46b | ||
|
|
2a09140ade | ||
| 500ac66ab7 | |||
|
|
73190a619d | ||
|
|
5300abb293 | ||
|
|
b186dfd820 | ||
|
|
71ffcb93de | ||
|
|
16cf611c53 | ||
|
|
9c938ec11e | ||
|
|
2d9a14f9ed | ||
|
|
4e7bd904b9 | ||
|
|
eb85303fcf | ||
|
|
b123727587 | ||
|
|
4e1ec8b2eb | ||
|
|
2ff812875a | ||
|
|
93e0b24d6f | ||
|
|
634d9703e6 | ||
|
|
aca7d773c9 | ||
|
|
032f0c9de1 | ||
|
|
b30dda201b | ||
|
|
5a973f2630 | ||
|
|
84998050e4 |
10 changed files with 169 additions and 69 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -2,3 +2,7 @@ dropwatch-1.0.tbz2
|
|||
dropwatch-1.1-0.tbz2
|
||||
dropwatch-1.2.tbz2
|
||||
/dropwatch-1.4.tbz2
|
||||
/dropwatch-1.5.tar.gz
|
||||
/dropwatch-1.5.3.tar.gz
|
||||
/dropwatch-1.5.4.tar.gz
|
||||
/dropwatch-1.5.5.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up ./src/lookup_kas.c.orig ./src/lookup_kas.c
|
||||
--- ./src/lookup_kas.c.orig 2012-05-30 18:43:23.000000000 -0400
|
||||
+++ ./src/lookup_kas.c 2015-07-06 09:03:59.093744007 -0400
|
||||
@@ -102,7 +102,7 @@ static int lookup_kas_proc(__u64 pc, str
|
||||
* - "%pK %c %s\n" (for kernel internal symbols), or
|
||||
* - "%pK %c %s\t[%s]\n" (for module-provided symbols)
|
||||
*/
|
||||
- if (fscanf(pf, "%llx %*s %as [ %*[^]] ]", &ppc, &name) < 0) {
|
||||
+ if (fscanf(pf, "%llx %*s %ms [ %*[^]] ]", (unsigned long long *)&ppc, &name) < 0) {
|
||||
perror("Error Scanning File: ");
|
||||
break;
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
diff -up ./src/Makefile.linker ./src/Makefile
|
||||
--- ./src/Makefile.linker 2012-05-30 18:35:40.000000000 -0400
|
||||
+++ ./src/Makefile 2018-02-02 07:19:25.625443850 -0500
|
||||
@@ -1,6 +1,6 @@
|
||||
all: dropwatch
|
||||
CFLAGS+=-c -g -D_GNU_SOURCE -Wall -Werror `pkg-config --cflags libnl-3.0`
|
||||
-LDFLAGS=-lbfd -lreadline -lnl-3 -lnl-genl-3
|
||||
+LDFLAGS+=-lbfd -lreadline -lnl-3 -lnl-genl-3
|
||||
OBJFILES := main.o lookup.o\
|
||||
lookup_bfd.o lookup_kas.o
|
||||
|
||||
170
dropwatch.spec
170
dropwatch.spec
|
|
@ -1,54 +1,158 @@
|
|||
Summary: Kernel dropped packet monitor
|
||||
Name: dropwatch
|
||||
Version: 1.4
|
||||
Release: 22%{?dist}
|
||||
Source0: https://fedorahosted.org/releases/d/r/dropwatch/dropwatch-%{version}.tbz2
|
||||
URL: http://fedorahosted.org/dropwatch
|
||||
License: GPLv2+
|
||||
Group: Applications/System
|
||||
BuildRequires: kernel-headers readline-devel
|
||||
BuildRequires: binutils-devel libnl3-devel pkgconfig
|
||||
Requires: libnl3, readline
|
||||
Name: dropwatch
|
||||
Version: 1.5.5
|
||||
Release: 2%{?dist}
|
||||
Summary: Kernel dropped packet monitor
|
||||
|
||||
Patch0: convert-a-to-m-in-scanf-line.patch
|
||||
Patch1: printf-format-fix.patch
|
||||
Patch2: dropwatch-linker-fix.patch
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://github.com/nhorman/dropwatch
|
||||
Source0: https://github.com/nhorman/dropwatch/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: libtool
|
||||
BuildRequires: kernel-headers
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: libnl3-devel
|
||||
BuildRequires: libpcap-devel
|
||||
BuildRequires: readline-devel
|
||||
|
||||
Requires: libnl3
|
||||
Requires: readline
|
||||
|
||||
%description
|
||||
dropwatch is an utility to interface to the kernel to monitor for dropped
|
||||
network packets.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
cd src
|
||||
export CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
|
||||
make
|
||||
./autogen.sh
|
||||
%configure
|
||||
%make_build
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
install -m0755 src/dropwatch $RPM_BUILD_ROOT%{_bindir}
|
||||
install -m0644 doc/dropwatch.1 $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
|
||||
%{make_install}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/*
|
||||
%{_mandir}/man1/*
|
||||
%doc README
|
||||
%doc COPYING
|
||||
%{_bindir}/dropwatch
|
||||
%{_bindir}/dwdump
|
||||
%{_mandir}/man1/dropwatch.1*
|
||||
%{_mandir}/man1/dwdump.1*
|
||||
%doc README.md
|
||||
%license COPYING
|
||||
|
||||
%changelog
|
||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.5-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Wed Apr 30 2025 Hangbin Liu <haliu@redhat.com> - 1.5.5-1
|
||||
- Update to version 1.5.5
|
||||
- kas is the default symbol lookup method now
|
||||
- Fix building without libtool installed
|
||||
- Misc fixes for kas lookup logic
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Tue Nov 14 2023 Hangbin Liu <haliu@redhat.com> - 1.5.4-5
|
||||
- Update License to SPDX format
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu May 5 2022 Hangbin Liu <haliu@redhat.com> - 1.5.4-1
|
||||
- Update to version 1.5.4
|
||||
- Support packet drop reason reporting when included in netlink message
|
||||
- fix some minor compilation warnings/errors
|
||||
- clean up some comments about deadline support
|
||||
- convert configure.ac to use AM_PROG_LIBTOOL from outdated LT_INIT
|
||||
- Fix missing SOL_NETLINK define in glibc < 2.24
|
||||
- Fix licensing issues that didn't make sense
|
||||
- ignore ENOBUFS errors on data socket
|
||||
- adding arm64 travis ci testing
|
||||
- man page updates
|
||||
- move to libnl3 from libnl
|
||||
|
||||
* Sat Jan 29 2022 Hangbin Liu <haliu@redhat.com> - 1.5.3-8
|
||||
- Fix compilation error with gcc 12
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Mon Jul 12 2021 Hangbin Liu <haliu@redhat.com> - 1.5.3-5
|
||||
- Update spec file
|
||||
- Update Makefile license
|
||||
- Update obsoleted m4 macros
|
||||
- Install new command dwdump
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Fri Nov 13 2020 Jeff Law <law@redhat.com> - 1.5.3-3
|
||||
- Fix off-by-one buffer overflow caught by gcc-11
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Thu Mar 19 2020 Neil Horman <nhorman@redhat.com> - 1.5.3-1
|
||||
- Update to latest upstream
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.5-7
|
||||
- Rebuild for readline 8.0
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Fri May 18 2018 Neil Horman <nhorman@redhat.com> - 1.5-4
|
||||
- add rpm-build to test.yml inventory
|
||||
|
||||
* Fri May 18 2018 Neil Horman <nhorman@redhat.com> - 1.5-3
|
||||
- add wget to test.yml inventory
|
||||
|
||||
* Fri May 18 2018 Neil Horman <nhorman@redhat.com> - 1.5-2
|
||||
- Make inventory script executable
|
||||
|
||||
* Tue May 15 2018 Neil Horman <nhorman@redhat.com> - 1.5-1
|
||||
- Update to latest upstream and add CI harness
|
||||
|
||||
* Tue May 08 2018 Neil Horman <nhorman@redhat.com> - 1.4-23
|
||||
- Updated specfile url and source location for github
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-22
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Fri Feb 1 2018 Neil Horman <nhorman@redhat.com> - 1.4-21
|
||||
* Thu Feb 01 2018 Neil Horman <nhorman@redhat.com> - 1.4-21
|
||||
- Fix linker flag recognition (bz 1541058)
|
||||
|
||||
* Thu Feb 1 2018 Florian Weimer <fweimer@redhat.com> - 1.4-20
|
||||
|
|
|
|||
9
plans.fmf
Normal file
9
plans.fmf
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
summary: Run dropwatch selftest
|
||||
discover:
|
||||
how: fmf
|
||||
prepare:
|
||||
how: install
|
||||
# install psmisc for killall
|
||||
package: [dropwatch, psmisc]
|
||||
execute:
|
||||
how: tmt
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up ./src/main.c.fixup ./src/main.c
|
||||
--- ./src/main.c.fixup 2017-01-13 07:26:06.255896365 -0500
|
||||
+++ ./src/main.c 2017-01-13 07:26:34.349677272 -0500
|
||||
@@ -333,7 +333,7 @@ void handle_dm_alert_msg(struct netlink_
|
||||
printf ("%d drops at location %p\n", alert->points[i].count, location);
|
||||
else
|
||||
printf ("%d drops at %s+%llx (%p)\n",
|
||||
- alert->points[i].count, res.symbol, res.offset, location);
|
||||
+ alert->points[i].count, res.symbol, (long long unsigned)res.offset, location);
|
||||
acount++;
|
||||
if (alimit && (acount == alimit)) {
|
||||
printf("Alert limit reached, deactivating!\n");
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
5145753b3e9255bd9b190251ba4d3bbf dropwatch-1.4.tbz2
|
||||
SHA512 (dropwatch-1.5.5.tar.gz) = b85de34d9b7c1f8232720dd8d4d843cb251ef96d2d9bd592e001d889bd55c2c6821cb8fb3af061bd8e5e2488f9f3aef4c45d1a0c41de3e626bc7c3794c1a4405
|
||||
|
|
|
|||
2
tests/main.fmf
Normal file
2
tests/main.fmf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
summary: Smoke test
|
||||
test: ./run_tests.sh
|
||||
15
tests/run_tests.sh
Executable file
15
tests/run_tests.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
abort_dropwatch() {
|
||||
sleep 5
|
||||
killall -SIGINT dropwatch
|
||||
}
|
||||
|
||||
abort_dropwatch &
|
||||
echo -e "set alertlimit 1\nstart\nstop\nexit" | dropwatch -l kas &> "$TMT_TEST_DATA"/dropwatch.log
|
||||
|
||||
# shellcheck disable=SC2181
|
||||
[ $? -eq 0 ] && exit 0
|
||||
# If the platform doesn't support NET_DM, skip this test
|
||||
# Usually we got this issue in container as no privilege permission
|
||||
grep -q NET_DM "$TMT_TEST_DATA"/dropwatch.log && exit 0 || exit 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue