[packages/arpwatch] Rel 3. Ignore ARP probes from 0.0.0.0, -N only silences bogon reports
arekm
arekm at pld-linux.org
Tue Dec 1 10:10:56 CET 2026
commit 9a9cc307f06389d90a8dfbfce656a1426c4474d3
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Dec 1 10:10:16 2026 +0100
Rel 3. Ignore ARP probes from 0.0.0.0, -N only silences bogon reports
arpwatch-nobogons.patch | 35 +++++++++++++++++++++++++++++++++++
arpwatch-zero-ip.patch | 19 +++++++++++++++++++
arpwatch.spec | 6 +++++-
3 files changed, 59 insertions(+), 1 deletion(-)
---
diff --git a/arpwatch.spec b/arpwatch.spec
index 059e29a..5f7236f 100644
--- a/arpwatch.spec
+++ b/arpwatch.spec
@@ -8,7 +8,7 @@ Summary(ru.UTF-8): Инструмент для отслеживания IP ад
Summary(uk.UTF-8): Інструмент для відслідковування IP адрес в локальній мережі
Name: arpwatch
Version: 3.9
-Release: 2
+Release: 3
Epoch: 2
License: BSD
Group: Networking/Daemons
@@ -32,6 +32,8 @@ Patch9: %{name}-path.patch
Patch10: %{name}-quiet.patch
Patch11: %{name}-nolocal.patch
Patch12: %{name}-filter.patch
+Patch13: %{name}-zero-ip.patch
+Patch14: %{name}-nobogons.patch
URL: https://ee.lbl.gov/
BuildRequires: autoconf >= 2.71
BuildRequires: libpcap-devel
@@ -79,6 +81,8 @@ Dodatkowo tworzona jest baza par adresów ethernet/IP.
%patch -P10 -p1
%patch -P11 -p1
%patch -P12 -p1
+%patch -P13 -p1
+%patch -P14 -p1
# the database directory is hardwired in the manuals and scripts
%{__sed} -i -e 's|/usr/local/arpwatch|/var/lib/%{name}|g' *.8.in *.sh.in *.sh
diff --git a/arpwatch-nobogons.patch b/arpwatch-nobogons.patch
new file mode 100644
index 0000000..3344779
--- /dev/null
+++ b/arpwatch-nobogons.patch
@@ -0,0 +1,35 @@
+-N is documented as turning off bogon reports, but it turns off bogon
+detection, so addresses from other networks go into the database and get
+reported as new stations and flip flops.
+
+Origin: Debian 50_change-N-to-only-stop-reporting-bogons (Debian #480835).
+
+--- arpwatch-3.9.orig/arpwatch.c 2026-12-01 10:06:55.129460459 +0100
++++ arpwatch-3.9/arpwatch.c 2026-12-01 10:07:01.131132131 +0100
+@@ -537,7 +537,7 @@
+
+ /* Watch for bogons */
+ if (isbogon(sia)) {
+- if (!quiet)
++ if (!quiet && !nobogons)
+ dosyslog(LOG_INFO, "bogon", sia, sea, sha);
+ return;
+ }
+@@ -701,7 +701,7 @@
+
+ /* Watch for bogons */
+ if (isbogon(sia)) {
+- if (!quiet)
++ if (!quiet && !nobogons)
+ dosyslog(LOG_INFO, "bogon", sia, sea, sha);
+ return;
+ }
+@@ -942,8 +942,6 @@
+ int i;
+ struct nets *np;
+
+- if (nobogons)
+- return (0);
+ if ((sia & netmask) == net)
+ return (0);
+ for (i = 0, np = nets; i < nets_ind; ++i, ++np)
diff --git a/arpwatch-zero-ip.patch b/arpwatch-zero-ip.patch
new file mode 100644
index 0000000..78efcce
--- /dev/null
+++ b/arpwatch-zero-ip.patch
@@ -0,0 +1,19 @@
+Ignore the sender address 0.0.0.0: ARP probes (RFC 5227) carry it before a
+host owns an address, so probes from different hosts were reported as
+0.0.0.0 changing its ethernet address.
+
+Origin: Debian 25ignore_zero_ip.
+
+--- arpwatch-3.9.orig/db.c 2023-09-05 19:50:56.000000000 +0200
++++ arpwatch-3.9/db.c 2026-12-01 10:01:10.742102224 +0100
+@@ -108,6 +108,10 @@
+ time_t t2;
+ char *host;
+
++ /* RFC 5227 ARP probes and DHCP clients use 0.0.0.0 as the sender */
++ if (a == 0)
++ return (1);
++
+ /* Lookup ip address */
+ ap = ainfo_find(a);
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/arpwatch.git/commitdiff/9a9cc307f06389d90a8dfbfce656a1426c4474d3
More information about the pld-cvs-commit
mailing list