[Git][NTPsec/ntpsec][master] Clear peer when peer interface changed
Hal Murray (@hal.murray)
gitlab at mg.gitlab.com
Sat Jun 28 09:56:08 UTC 2025
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
35d713ec by rszymanski at 2025-06-28T02:52:50-07:00
Clear peer when peer interface changed
This appears to be a valid code that was removed during one of the
cleanups of dead code. See commit 7008f12a9616f61fb688993c166c38bef0b1b25b
Clearing peer helps with faster synchronization recovery, as the called
routine resets 'nextdate' field, which drives the timer.
- - - - -
1 changed file:
- ntpd/ntp_peer.c
Changes:
=====================================
ntpd/ntp_peer.c
=====================================
@@ -477,6 +477,7 @@ peer_refresh_interface(
)
{
endpt * niface;
+ endpt * piface;
niface = select_peerinterface(p, &p->srcadr, NULL);
@@ -496,7 +497,11 @@ peer_refresh_interface(
DPRINT(4, ("<NONE>\n"));
}
+ piface = p->dstadr;
set_peerdstadr(p, niface);
+ if (p->dstadr != NULL && p->dstadr != piface) {
+ peer_clear(p, "XFAC", false);
+ }
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/35d713ecc40ebddb13c9013854fbe20b6815de2d
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/35d713ecc40ebddb13c9013854fbe20b6815de2d
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20250628/0b86f4cd/attachment-0001.htm>
More information about the vc
mailing list