From: Daniel Salzman Date: Fri, 18 Mar 2022 08:18:54 +0000 (+0100) Subject: load: distinguish if SOA serial is lower or incomparable in a warning log X-Git-Tag: v3.3.dev~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4eeb9a32f9a1be64f8a4e95e5145a5cc400d81c;p=thirdparty%2Fknot-dns.git load: distinguish if SOA serial is lower or incomparable in a warning log --- diff --git a/src/knot/events/handlers/load.c b/src/knot/events/handlers/load.c index 8c83285905..8b15625057 100644 --- a/src/knot/events/handlers/load.c +++ b/src/knot/events/handlers/load.c @@ -240,7 +240,11 @@ load_end: log_zone_warning(zone->name, "zone file changed without SOA serial update"); break; case KNOT_ERANGE: - log_zone_warning(zone->name, "zone file changed, but SOA serial decreased"); + if (serial_compare(zone->zonefile.serial, zone_contents_serial(zone->contents)) == SERIAL_INCOMPARABLE) { + log_zone_warning(zone->name, "zone file changed with incomparable SOA serial"); + } else { + log_zone_warning(zone->name, "zone file changed with decreased SOA serial"); + } break; } goto cleanup; diff --git a/src/knot/zone/serial.h b/src/knot/zone/serial.h index 18e24b1284..effb1c6399 100644 --- a/src/knot/zone/serial.h +++ b/src/knot/zone/serial.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 CZ.NIC, z.s.p.o. +/* Copyright (C) 2022 CZ.NIC, z.s.p.o. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,8 @@ #include #include +#define SERIAL_MAX_INCREMENT 2147483647 + /*! * \brief result of serial comparison. LOWER means that the first serial is lower that the second. *