[Git][NTPsec/ntpsec][master] Fix mode 6 client to round up to 4 bytes (was 8)
Matthew Selsky
Matthew.Selsky at twosigma.com
Mon Nov 27 15:24:03 UTC 2023
On Sun, Nov 26, 2023 at 11:43:14PM +0000, Hal Murray (--- via vc wrote:
> Hal Murray pushed to branch master at [1]NTPsec / ntpsec
>
> Commits:
>
> • [2]d98ce8d7
> by Hal Murray at 2023-11-26T15:42:51-08:00
>
> Fix mode 6 client to round up to 4 bytes (was 8)
>
> 1 changed file:
>
> • [3]ntpd/ntp_control.c
>
> Changes:
>
> • [4]ntpd/ntp_control.c
>
> ══════════════════════════════════════════════════════════════════════════
>
> ... ... @@ -879,7 +879,7 @@ process_control(
> 879 879 properlen = req_count + (int)CTL_HEADER_LEN;
> 880 880 /* round up proper len to a 8 octet boundary */
> 881 881
> 882 - properlen = (properlen + 7) & ~7;
> 882 + properlen = (properlen + 3) & ~3;
> 883 883 maclen = rbufp->recv_length - (size_t)properlen;
> 884 884 if ((rbufp->recv_length & 3) == 0 &&
> 885 885 maclen >= MIN_MAC_LEN && maclen <= MAX_MAC_LEN) {
Hi Hal,
Does the comment on line 880 also need to be updated?
Cheers,
-Matt
More information about the devel
mailing list