openbsd-ports/net/arpwatch/patches/patch-db_c
2022-03-11 19:45:43 +00:00

38 lines
930 B
Plaintext

ignore 0.0.0.0
https://sources.debian.org/patches/arpwatch/2.1a15-6/25ignore_zero_ip/
remove DECnet remnants
Index: db.c
--- db.c.orig
+++ db.c
@@ -95,6 +95,11 @@ ent_add(register u_int32_t a, register u_char *e, time
u_char *e2;
time_t t2;
+ /* Ignore 0.0.0.0 */
+ if (a == 0) {
+ return(1);
+ }
+
/* Lookup ip address */
ap = ainfo_find(a);
@@ -124,14 +129,11 @@ ent_add(register u_int32_t a, register u_char *e, time
ep = ap->elist[1];
if (MEMCMP(e, ep->e, 6) == 0) {
/*
- * Suppress report when less than
- * FLIPFLOP_DELTA and one of the two ethernet
- * addresses is a DECnet logical.
+ * Suppress report when less than FLIPFLOP_DELTA.
*/
t2 = ap->elist[0]->t;
e2 = ap->elist[0]->e;
- if (t - t2 < FLIPFLIP_DELTA &&
- (isdecnet(e) || isdecnet(e2)))
+ if (t - t2 < FLIPFLIP_DELTA)
dosyslog(LOG_INFO,
"suppressed DECnet flip flop", a, e, e2);
else