]> git.ipfire.org Git - thirdparty/nqptp.git/log
thirdparty/nqptp.git
3 months agoMerge pull request #34 from heitbaum/patch-1 main
Mike Brady [Wed, 28 Feb 2024 17:22:07 +0000 (17:22 +0000)] 
Merge pull request #34 from heitbaum/patch-1

change setcap to AmbientCapabilities in README.md

3 months agochange setcap to AmbientCapabilities in README.md 34/head
Rudi Heitbaum [Wed, 28 Feb 2024 11:48:04 +0000 (22:48 +1100)] 
change setcap to AmbientCapabilities in README.md

3 months agoMerge pull request #32 from qerub/patch-1
Mike Brady [Sun, 25 Feb 2024 17:03:41 +0000 (17:03 +0000)] 
Merge pull request #32 from qerub/patch-1

Add missing rm command to README.md

3 months agoMerge pull request #31 from klemensn/openbsd
Mike Brady [Sun, 25 Feb 2024 17:03:03 +0000 (17:03 +0000)] 
Merge pull request #31 from klemensn/openbsd

Support OpenBSD

3 months agoAdd missing rm command to README.md 32/head
Christoffer Sawicki [Sun, 18 Feb 2024 22:11:31 +0000 (23:11 +0100)] 
Add missing rm command to README.md

4 months agoHoist control socket handling, restrict runtime on OpenBSD 31/head
Klemens Nanni [Sat, 27 Jan 2024 05:44:35 +0000 (06:44 +0100)] 
Hoist control socket handling, restrict runtime on OpenBSD

Use pledge(2) to prevent fork/exec, filesystem access and other
unused subsets of system calls, effectively leaving only shared
memory and networking capabilities at runtime.

(Those might be further reduced, but that warrants further analysis
 and most likely more code shuffling.)

4 months agoHoist PTP socket handling, drop privileges on OpenBSD
Klemens Nanni [Sat, 27 Jan 2024 04:36:29 +0000 (05:36 +0100)] 
Hoist PTP socket handling, drop privileges on OpenBSD

bind(2)ing ports below 1024 is the only privileged operation NQPTP does.

Move its code up in main() before shared memory handling such that root
privileges can be dropped immediately after it;  no currently supported
system does that, thus this should be a NOOP.

Do so on OpenBSD where shm_open(3) does not allow access to shared memory
objects by multiple UIDs, i.e. to communicate, shairport-sync and NQPTP
must create them and run as the very same user.

OpenBSD's official audio/shairport-sync user provides an rc.d(8) daemon
script that runs as `_shairport` user.

4 months agoBuild on OpenBSD
Klemens Nanni [Sat, 27 Jan 2024 00:38:42 +0000 (01:38 +0100)] 
Build on OpenBSD

Recognise the system to configure, build and start.
More work is required to actually work with shairport-sync.
Tested on OpenBSD/amd64 7.4-current.

7 months agoUpdate RELEASE_NOTES.md
Mike Brady [Sun, 15 Oct 2023 18:01:55 +0000 (19:01 +0100)] 
Update RELEASE_NOTES.md

7 months agoChange Linux installation to use AmbientCapabilities from systemd. Fix FreeBSD compil...
Mike Brady [Sun, 15 Oct 2023 17:59:14 +0000 (18:59 +0100)] 
Change Linux installation to use AmbientCapabilities from systemd. Fix FreeBSD compilation errors.

8 months agoreorder the include files for FreeBSD
Mike Brady [Tue, 19 Sep 2023 20:55:44 +0000 (21:55 +0100)] 
reorder the include files for FreeBSD

8 months agoUpdate RELEASE_NOTES.md
Mike Brady [Tue, 19 Sep 2023 10:18:05 +0000 (11:18 +0100)] 
Update RELEASE_NOTES.md

8 months agoUpdate RELEASE_NOTES.md
Mike Brady [Tue, 19 Sep 2023 10:17:19 +0000 (11:17 +0100)] 
Update RELEASE_NOTES.md

8 months agoImprove some of the error messages. Remove the setcap command from Makefile.am, since...
Mike Brady [Tue, 19 Sep 2023 10:08:27 +0000 (11:08 +0100)] 
Improve some of the error messages. Remove the setcap command from Makefile.am, since we are now using an AmbientCapabilities setting in the systemd service file.

8 months agoUpdate README.md
Mike Brady [Tue, 19 Sep 2023 09:59:35 +0000 (10:59 +0100)] 
Update README.md

8 months agoUpdate README.md
Mike Brady [Tue, 19 Sep 2023 09:59:10 +0000 (10:59 +0100)] 
Update README.md

8 months agoMerge pull request #26 from Hs-Yeah/development 1.2.5-dev
Mike Brady [Tue, 19 Sep 2023 08:43:33 +0000 (09:43 +0100)] 
Merge pull request #26 from Hs-Yeah/development

Added AmbientCapabilities to nqptp.service.in

8 months agoAdded AmbientCapabilities to nqptp.service.in 26/head
Hs_Yeah [Mon, 18 Sep 2023 19:12:47 +0000 (03:12 +0800)] 
Added AmbientCapabilities to nqptp.service.in

Added AmbientCapabilities=CAP_NET_BIND_SERVICE
so that the systemd service can be used without the  capability set on the built nqptp binary.

8 months agoUpdate README.md
Mike Brady [Mon, 18 Sep 2023 16:20:56 +0000 (17:20 +0100)] 
Update README.md

8 months agoUpdated release notes
Mike Brady [Sat, 16 Sep 2023 17:56:35 +0000 (18:56 +0100)] 
Updated release notes

8 months agoUpdate release notes, readme and configuration version number. 1.2.4
Mike Brady [Sat, 16 Sep 2023 17:51:55 +0000 (18:51 +0100)] 
Update release notes, readme and configuration version number.

8 months agoUpdate README.md
Mike Brady [Tue, 12 Sep 2023 10:29:22 +0000 (11:29 +0100)] 
Update README.md

8 months agoUpdate RELEASE_NOTES.md
Mike Brady [Mon, 11 Sep 2023 16:08:55 +0000 (17:08 +0100)] 
Update RELEASE_NOTES.md

8 months agoUpdate RELEASE_NOTES.md
Mike Brady [Mon, 11 Sep 2023 16:08:27 +0000 (17:08 +0100)] 
Update RELEASE_NOTES.md

8 months agoUpdate RELEASE_NOTES.md
Mike Brady [Mon, 11 Sep 2023 16:08:02 +0000 (17:08 +0100)] 
Update RELEASE_NOTES.md

8 months agoUpdate RELEASE_NOTES.md
Mike Brady [Mon, 11 Sep 2023 16:06:45 +0000 (17:06 +0100)] 
Update RELEASE_NOTES.md

8 months agoMove to smi version 10, read-only interface, no mutex, write and read each record...
Mike Brady [Mon, 11 Sep 2023 15:49:34 +0000 (16:49 +0100)] 
Move to smi version 10, read-only interface, no mutex, write and read each record twice to ensure it is not inconsistent when read.

8 months agoUpdate README.md
Mike Brady [Mon, 11 Sep 2023 15:39:22 +0000 (16:39 +0100)] 
Update README.md

8 months agoUpdate README.md
Mike Brady [Mon, 11 Sep 2023 15:38:28 +0000 (16:38 +0100)] 
Update README.md

8 months agoUpdate README.md
Mike Brady [Mon, 11 Sep 2023 15:21:24 +0000 (16:21 +0100)] 
Update README.md

8 months agoUpdate README.md
Mike Brady [Mon, 11 Sep 2023 15:19:58 +0000 (16:19 +0100)] 
Update README.md

9 months ago1.2.4d0 1.2.4d0
Mike Brady [Mon, 4 Sep 2023 18:03:23 +0000 (19:03 +0100)] 
1.2.4d0

9 months agoFix a bug whereby a maliciously-crafted packet received on the control port could... 1.2.3
Mike Brady [Mon, 4 Sep 2023 16:17:36 +0000 (17:17 +0100)] 
Fix a bug whereby a maliciously-crafted packet received on the control port could crash the program.

9 months agoFix a crashing bug with an empty command string and check for missing or bad paramete...
Mike Brady [Sat, 12 Aug 2023 17:25:58 +0000 (18:25 +0100)] 
Fix a crashing bug with an empty command string and check for missing or bad parameters a bit more carefully

12 months agoUpdate README.md 1.2.2
Mike Brady [Tue, 23 May 2023 15:52:34 +0000 (16:52 +0100)] 
Update README.md

Remove references to the `development` branch!

12 months ago1.2.2d0 1.2.2d0
Mike Brady [Mon, 22 May 2023 09:25:39 +0000 (10:25 +0100)] 
1.2.2d0

12 months agobump version number 1.2.1
Mike Brady [Mon, 22 May 2023 09:18:48 +0000 (10:18 +0100)] 
bump version number

12 months agoInclude lightweight tags and note if broken.
Mike Brady [Sun, 21 May 2023 12:39:15 +0000 (13:39 +0100)] 
Include lightweight tags and note if broken.

12 months agomerge updates from 1.2 main
Mike Brady [Sun, 21 May 2023 12:26:20 +0000 (13:26 +0100)] 
merge updates from 1.2 main

12 months agoactually make it 1.2 1.2
Mike Brady [Sat, 20 May 2023 17:10:39 +0000 (18:10 +0100)] 
actually make it 1.2

12 months agoversion 1.2rc0
Mike Brady [Sat, 20 May 2023 16:58:47 +0000 (17:58 +0100)] 
version 1.2rc0

12 months agoupdate Release Notes
Mike Brady [Sat, 20 May 2023 16:56:15 +0000 (17:56 +0100)] 
update Release Notes

12 months agoslight change in format of output of the smi in the -V command.
Mike Brady [Sat, 20 May 2023 15:47:38 +0000 (16:47 +0100)] 
slight change in format of output of the smi in the -V command.

12 months agoslight change in format of output of the smi in the -V command.
Mike Brady [Sat, 20 May 2023 15:46:17 +0000 (16:46 +0100)] 
slight change in format of output of the smi in the -V command.

12 months agoMerge branch 'main' into development
Mike Brady [Sat, 20 May 2023 12:03:57 +0000 (13:03 +0100)] 
Merge branch 'main' into development
Typo

12 months agoMerge pull request #21 from tsbernar/patch-1
Mike Brady [Sat, 20 May 2023 11:54:23 +0000 (12:54 +0100)] 
Merge pull request #21 from tsbernar/patch-1

Update README.md

12 months agoDocumentation and version string updates.
Mike Brady [Sat, 20 May 2023 11:51:35 +0000 (12:51 +0100)] 
Documentation and version string updates.

13 months agoFix a FreeBSD compilation error.
Mike Brady [Tue, 18 Apr 2023 14:05:59 +0000 (15:05 +0100)] 
Fix a FreeBSD compilation error.

14 months agoUpdate README.md 21/head
Trevor Bernard [Sat, 8 Apr 2023 17:39:36 +0000 (12:39 -0500)] 
Update README.md

small typo

14 months agoUpdate RELEASE_NOTES.md
Mike Brady [Sun, 2 Apr 2023 18:50:16 +0000 (19:50 +0100)] 
Update RELEASE_NOTES.md

14 months agoMerge branch 'development' of github.com:mikebrady/nqptp into development
Mike Brady [Sun, 2 Apr 2023 14:34:15 +0000 (15:34 +0100)] 
Merge branch 'development' of github.com:mikebrady/nqptp into development

Online updates merged.

14 months agoChange open_sockets_at_port to be satisfied with just one port on IPv4 or IPv6. Fix...
Mike Brady [Sun, 2 Apr 2023 14:28:31 +0000 (15:28 +0100)] 
Change open_sockets_at_port to be satisfied with just one port on IPv4 or IPv6. Fix misleading message.

14 months agoUpdate RELEASE_NOTES.md
Mike Brady [Thu, 30 Mar 2023 09:26:38 +0000 (10:26 +0100)] 
Update RELEASE_NOTES.md

14 months agoUpdate RELEASE_NOTES.md
Mike Brady [Thu, 30 Mar 2023 09:26:21 +0000 (10:26 +0100)] 
Update RELEASE_NOTES.md

14 months agoMerge branch 'development' of github.com:mikebrady/nqptp into development
Mike Brady [Thu, 30 Mar 2023 09:20:37 +0000 (10:20 +0100)] 
Merge branch 'development' of github.com:mikebrady/nqptp into development

Merge other update.

14 months agoTune the weights of additions and reductions.
Mike Brady [Thu, 30 Mar 2023 09:19:28 +0000 (10:19 +0100)] 
Tune the weights of additions and reductions.

15 months agoFix a bug -- use the previous offset if a negative jitter for the first period. Fix...
Mike Brady [Thu, 2 Mar 2023 13:00:40 +0000 (13:00 +0000)] 
Fix a bug -- use the previous offset if a negative jitter for the first period. Fix a misleading comment.

15 months agoUpdate README.md
Mike Brady [Mon, 13 Feb 2023 08:55:36 +0000 (08:55 +0000)] 
Update README.md

15 months agoUpdate README.md
Mike Brady [Mon, 13 Feb 2023 08:54:27 +0000 (08:54 +0000)] 
Update README.md

16 months agoUpdate RELEASE_NOTES.md
Mike Brady [Fri, 27 Jan 2023 18:40:27 +0000 (18:40 +0000)] 
Update RELEASE_NOTES.md

16 months agoAdd modifications suggested by https://github.com/mikebrady/nqptp/issues/14 to restri...
Mike Brady [Fri, 27 Jan 2023 18:30:50 +0000 (18:30 +0000)] 
Add modifications suggested by https://github.com/mikebrady/nqptp/issues/14 to restrict UDP write access to 9000 to the localhost.

16 months agoMerge pull request #17 from Weidav/main
Mike Brady [Fri, 27 Jan 2023 18:14:17 +0000 (18:14 +0000)] 
Merge pull request #17 from Weidav/main

typo: remove duplicate you

16 months agoUpdate RELEASE_NOTES.md
Mike Brady [Thu, 19 Jan 2023 15:16:26 +0000 (15:16 +0000)] 
Update RELEASE_NOTES.md

16 months agoEnhance an error message.
Mike Brady [Thu, 19 Jan 2023 14:46:15 +0000 (14:46 +0000)] 
Enhance an error message.

17 months agoUpdate README.md
Mike Brady [Wed, 14 Dec 2022 10:22:45 +0000 (10:22 +0000)] 
Update README.md

17 months agoTidy up a few comments.
Mike Brady [Tue, 13 Dec 2022 09:42:45 +0000 (09:42 +0000)] 
Tidy up a few comments.

17 months agoBump the SHM Interface number to note new commands.
Mike Brady [Tue, 13 Dec 2022 09:31:12 +0000 (09:31 +0000)] 
Bump the SHM Interface number to note new commands.

17 months agoAdd version string to initial debug message
Mike Brady [Tue, 13 Dec 2022 09:07:02 +0000 (09:07 +0000)] 
Add version string to initial debug message
Work out when the clock can be relied upon not to go to sleep, i.e. is "active". This is when SPS is playing (B) or paused (P) and for brief periods after the clock is selected (T) and after play ends (E).
SPS signals Play/Pause/End/Timer Select/Timer Release with B/P/E/T messages -- B for "Begin". "T <ip>" means select the clock at that address. "T" means release the clock.
Reset clock smoothing when the clock goes "active" but not at any other time.
Clamp reductions in the offset calculated as a uint64_t remote-time-now_ns - local-time-now_ns -- and which it is assumed are due to delays in the network when the clock is "active" -- to 2.5 mS.
Turn off clock updates when the clock is not "active" -- i.e. when SPS is not paying or paused.
Remove some redundant features and code.

17 months agoAdd ability to receive status information from SPS B/E/P for Begin/End/Pause play...
Mike Brady [Sat, 10 Dec 2022 11:55:03 +0000 (11:55 +0000)] 
Add ability to receive status information from SPS B/E/P for Begin/End/Pause play. Assume clocks don't sleep between Begin and End and are valid for short times after T and after E. More cleaning up to do.

18 months agoAllow clock to resent if the grandmaster is the same as the master and it stops for...
Mike Brady [Wed, 7 Dec 2022 14:44:11 +0000 (14:44 +0000)] 
Allow clock to resent if the grandmaster is the same as the master and it stops for two or more samples. Always send a wakeup to the master at the start.

18 months agoSmall documentation update
Mike Brady [Mon, 5 Dec 2022 13:33:24 +0000 (13:33 +0000)] 
Small documentation update

18 months agoUpdate README.md
Mike Brady [Sat, 19 Nov 2022 09:12:54 +0000 (09:12 +0000)] 
Update README.md

20 months agotypo: remove duplicate you 17/head
weidav [Thu, 29 Sep 2022 16:27:02 +0000 (18:27 +0200)] 
typo: remove duplicate you

20 months agoMerge from main.
Mike Brady [Thu, 15 Sep 2022 14:36:45 +0000 (15:36 +0100)] 
Merge from main.

20 months agoSmall changes to debug messages.
Mike Brady [Thu, 15 Sep 2022 14:33:45 +0000 (15:33 +0100)] 
Small changes to debug messages.

20 months agoUpdate RELEASE_NOTES.md
Mike Brady [Thu, 15 Sep 2022 13:32:53 +0000 (14:32 +0100)] 
Update RELEASE_NOTES.md

20 months agoOnly try to start a silent clock if no follow_ups have _ever_ been seen since it...
Mike Brady [Thu, 15 Sep 2022 13:27:57 +0000 (14:27 +0100)] 
Only try to start a silent clock if no follow_ups have _ever_ been seen since it became master.

20 months agoUpdate RELEASE_NOTES.md
Mike Brady [Mon, 12 Sep 2022 15:22:17 +0000 (16:22 +0100)] 
Update RELEASE_NOTES.md

20 months agoSquashed commit of the following:
Mike Brady [Mon, 12 Sep 2022 14:14:52 +0000 (15:14 +0100)] 
Squashed commit of the following:

commit 1c610279b21ac778ab96fd2fb01fa0bbc8f363ce
Author: Mike Brady <4265913+mikebrady@users.noreply.github.com>
Date:   Mon Sep 12 15:07:15 2022 +0100

    * Bump NQPTP_SHM_STRUCTURES_VERSION to 8.
    * Remove the ability to handle multiple instances of AirPlay-2-capable Shairport Sync on the same system -- it seems clear that clients can not use this facility.
    * Greatly simplify NQPTP by only monitoring PTP information coming from the client, ignoring all other PTP information.
    * Improve the accuracy of the clock by taking correction field information into account.
    * In addition to trying to restart a clock that is silent, also send a restart to a clock if the clock's grandmaster appears to have stopped.

    Squashed commit of the following:
        Add some experimental exploratory code.
        Ignore the INSTALL document. Let INSTALL always be autogenerated.
        Enhanced and corrected ptp definitions.
        Fix shm name to work with FreeBSD. Update the SHM version.
        Change order of includes to avoid a compilation error in FreeBSD
        Fix potential bugs in finding a clock ID in a FreeBSD device.
        Only try to restart a stopped clock if it's the clock itself that has stopped and not a different grandmaster. Allow fast changes for up to one second after the start of mastership.
        Make the code to restart a clock a separate function and call it if a clock gets stuck. Include the correction field in the calculation of the precise origin timestamp. If a new clock is out by more than -4 seconds, treat it as a discontinuity rather than noise.
        Add a net-to-host converter for 64-bit arithmetic

20 months ago* Bump NQPTP_SHM_STRUCTURES_VERSION to 8.
Mike Brady [Mon, 12 Sep 2022 14:07:15 +0000 (15:07 +0100)] 
* Bump NQPTP_SHM_STRUCTURES_VERSION to 8.
* Remove the ability to handle multiple instances of AirPlay-2-capable Shairport Sync on the same system -- it seems clear that clients can not use this facility.
* Greatly simplify NQPTP by only monitoring PTP information coming from the client, ignoring all other PTP information.
* Improve the accuracy of the clock by taking correction field information into account.
* In addition to trying to restart a clock that is silent, also send a restart to a clock if the clock's grandmaster appears to have stopped.

Squashed commit of the following:
    Add some experimental exploratory code.
    Ignore the INSTALL document. Let INSTALL always be autogenerated.
    Enhanced and corrected ptp defiinitions.
    Fix shm name to work with FreeBSD. Update the SHM version.
    Change order of includes to avoid a compilation error in FreeBSD
    Fix potential bugs in finding a clock ID in a FreeBSD device.
    Only try to restart a stopped clock if it's the clock itself that has stopped and not a different grandmaster. Allow fast changes for up to one second after the start of mastership.

20 months agoUpdate RELEASE_NOTES.md
Mike Brady [Sat, 10 Sep 2022 11:05:52 +0000 (12:05 +0100)] 
Update RELEASE_NOTES.md

20 months agoIgnore configure~
Mike Brady [Sat, 10 Sep 2022 10:38:50 +0000 (11:38 +0100)] 
Ignore configure~

21 months agoUpdate RELEASE_NOTES.md
Mike Brady [Tue, 16 Aug 2022 09:10:05 +0000 (10:10 +0100)] 
Update RELEASE_NOTES.md

21 months agoSmall change to wording.
Mike Brady [Tue, 16 Aug 2022 08:58:55 +0000 (09:58 +0100)] 
Small change to wording.

21 months agoSmall change to wording.
Mike Brady [Tue, 16 Aug 2022 08:57:57 +0000 (09:57 +0100)] 
Small change to wording.

22 months agoGeneral clang format. Quieten a few debug messages.
Mike Brady [Sun, 31 Jul 2022 12:10:57 +0000 (13:10 +0100)] 
General clang format. Quieten a few debug messages.

22 months agoAdd a handle_sync to see if a correctionfiled is ever used. Modify handle_follow_up...
Mike Brady [Sun, 31 Jul 2022 11:35:30 +0000 (12:35 +0100)] 
Add a handle_sync to see if a correctionfiled is ever used. Modify handle_follow_up to (mostly) only work on a master clock. Wait for a minute to restart a stopped clock. Always invalidate the clock when an empty peer list is sent.

22 months agoUpdate handle_sync definition, remove handle_delay_resp definition -- not implemented.
Mike Brady [Sun, 31 Jul 2022 11:32:24 +0000 (12:32 +0100)] 
Update handle_sync definition, remove handle_delay_resp definition -- not implemented.

22 months agoOnly try to waken a clock if it's a master. Shorten Announce "ping" reversion time...
Mike Brady [Sun, 31 Jul 2022 11:31:18 +0000 (12:31 +0100)] 
Only try to waken a clock if it's a master. Shorten Announce "ping" reversion time to 150 ms.

22 months agoQuieten a few debug messages.
Mike Brady [Wed, 27 Jul 2022 12:27:32 +0000 (13:27 +0100)] 
Quieten a few debug messages.

22 months agoUpdate README.md
Mike Brady [Sat, 23 Jul 2022 08:26:41 +0000 (09:26 +0100)] 
Update README.md

22 months agoUpdate README.md
Mike Brady [Mon, 18 Jul 2022 08:19:31 +0000 (09:19 +0100)] 
Update README.md

22 months agoUpdate RELEASE_NOTES.md
Mike Brady [Thu, 14 Jul 2022 18:46:56 +0000 (19:46 +0100)] 
Update RELEASE_NOTES.md

22 months agoSmall diagnostic message fix.
Mike Brady [Thu, 14 Jul 2022 18:39:53 +0000 (19:39 +0100)] 
Small diagnostic message fix.

22 months agoMake the code to restart a clock a separate function and call it if a clock gets...
Mike Brady [Thu, 14 Jul 2022 16:55:38 +0000 (17:55 +0100)] 
Make the code to restart a clock a separate function and call it if a clock gets stuck. Include the correction field in the calculation of the precise origin timestamp. If a new clock is out by more than -4 seconds, treat it as a discontinuity rather than noise.

22 months agoAdd a net-to-host converter for 64-bit arithmetic
Mike Brady [Thu, 14 Jul 2022 09:10:19 +0000 (10:10 +0100)] 
Add a net-to-host converter for 64-bit arithmetic

22 months agoUpdate RELEASE_NOTES.md
Mike Brady [Sat, 9 Jul 2022 09:13:58 +0000 (10:13 +0100)] 
Update RELEASE_NOTES.md

22 months agoUpdate RELEASE_NOTES.md
Mike Brady [Sat, 9 Jul 2022 09:13:34 +0000 (10:13 +0100)] 
Update RELEASE_NOTES.md

22 months agoIf the previous offset's grandmaster is different from the current one, discard all...
Mike Brady [Sat, 9 Jul 2022 09:02:35 +0000 (10:02 +0100)] 
If the previous offset's grandmaster is different from the current one, discard all the smoothing stuff, including previous offset data, and work as if it was a completely new clock.

22 months agoAdd is a field to store the grandmaster the previous offset refers to. The idea is...
Mike Brady [Sat, 9 Jul 2022 09:00:18 +0000 (10:00 +0100)] 
Add is a field to store the grandmaster the previous offset refers to. The idea is that if the new grandmaster is different from the previous one, start over.