[Git][NTPsec/ntpsec][master] Generate the I/O layer's receive buffer size in a rational way.

Eric S. Raymond gitlab at mg.gitlab.com
Mon Jan 28 18:32:55 UTC 2019


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
6259ad92 by Eric S. Raymond at 2019-01-28T18:31:31Z
Generate the I/O layer's receive buffer size in a rational way.

- - - - -


1 changed file:

- include/recvbuff.h


Changes:

=====================================
include/recvbuff.h
=====================================
@@ -21,13 +21,13 @@
  */
 
 /*
- *  the maximum length NTP packet contains the NTP header, one Autokey
- *  request, one Autokey response and the MAC (Autokey has been removed
- *  from NTPsec, but we need to deal with the largest packets from legacy
- *  versions). Assuming certificates don't get too big, the maximum packet
- *  length is set arbitrarily at 1000.
+ *  The maximum length NTP packet contains the NTP header, one Autokey
+ *  request, one Autokey response, the MAC, and extension fields
+ *  (Autokey has been removed from NTPsec, but we need to deal with
+ *  the largest packets from legacy versions).  The only free prameter
+ *  here is the maximum length of extension data.
  */
-#define	RX_BUFF_SIZE	1000		/* hail Mary */
+#define	RX_BUFF_SIZE	(LEN_PKT_NOMAC + MAX_MAC_LEN + MAX_EXT_LEN)
 
 
 typedef struct recvbuf recvbuf_t;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/6259ad92e292e635c1e4b0258c92d15bd8abcd7d

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/6259ad92e292e635c1e4b0258c92d15bd8abcd7d
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/20190128/64949ee9/attachment.html>


More information about the vc mailing list