Re: [Git][NTPsec/ntpsec][master] Fix mode 6 client to round up to 4 bytes (was 8)

2023-11-29 Thread Hal Murray via devel
> Does the comment on line 880 also need to be updated?

Good catch.  Thanks.


-- 
These are my opinions.  I hate spam.



___
devel mailing list
devel@ntpsec.org
https://lists.ntpsec.org/mailman/listinfo/devel


Re: [Git][NTPsec/ntpsec][master] Fix mode 6 client to round up to 4 bytes (was 8)

2023-11-27 Thread Matthew Selsky via devel
On Sun, Nov 26, 2023 at 11:43:14PM +, 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
___
devel mailing list
devel@ntpsec.org
https://lists.ntpsec.org/mailman/listinfo/devel