Skip to content

Commit

Permalink
Merge pull request #420 from NLnetLabs/feature/old-serial-state
Browse files Browse the repository at this point in the history
State "old-serial" for nsd-control
  • Loading branch information
wtoorop authored Feb 11, 2025
2 parents 638c542 + 4987e39 commit 747f55e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,8 +1123,13 @@ print_zonestatus(RES* ssl, xfrd_state_type* xfrd, struct zone_options* zo)
return 1;
}
if(!ssl_printf(ssl, " state: %s\n",
(xz->state == xfrd_zone_ok)?"ok":(
(xz->state == xfrd_zone_expired)?"expired":"refreshing")))
xz->state == xfrd_zone_expired ? "expired"
: xz->state != xfrd_zone_ok ? "refreshing"
: !xz->soa_nsd_acquired || !xz->soa_disk_acquired
|| xz->soa_nsd.serial == xz->soa_disk.serial ? "ok"
: compare_serial( ntohl(xz->soa_nsd.serial)
, ntohl(xz->soa_disk.serial)) < 0 ? "old-serial"
: "future-serial"))
return 0;
if(!print_soa_status(ssl, "served-serial", &xz->soa_nsd,
xz->soa_nsd_acquired))
Expand Down

0 comments on commit 747f55e

Please sign in to comment.