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

Hal Murray (@hal.murray) gitlab at mg.gitlab.com
Sun Nov 26 23:43:14 UTC 2023



Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
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:

- ntpd/ntp_control.c


Changes:

=====================================
ntpd/ntp_control.c
=====================================
@@ -879,7 +879,7 @@ process_control(
 	properlen = req_count + (int)CTL_HEADER_LEN;
 	/* round up proper len to a 8 octet boundary */
 
-	properlen = (properlen + 7) & ~7;
+	properlen = (properlen + 3) & ~3;
 	maclen = rbufp->recv_length - (size_t)properlen;
 	if ((rbufp->recv_length & 3) == 0 &&
 	    maclen >= MIN_MAC_LEN && maclen <= MAX_MAC_LEN) {



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/d98ce8d7c72d1f8daead144ddc1a6f22fb540aa0

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/d98ce8d7c72d1f8daead144ddc1a6f22fb540aa0
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/20231126/5992ce87/attachment-0001.htm>


More information about the vc mailing list