From: Frank Kardel Date: Tue, 1 Aug 2006 18:03:38 +0000 (+0000) Subject: ntp_io.c: X-Git-Tag: NTP_4_2_3P24~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=971591045999da5bd125fa2e5ca1ace1d6cd9137;p=thirdparty%2Fntp.git ntp_io.c: Bug 678: make size of control message buffer configurable if needbe. use lower default of 1536 bytes as qnx couldn't cope with 5120 bytes and we are not really expecting long control messages. qnx limit is around 1900 bytes - qnx analysed by Michael Tatarinov - thanks bk: 44cf977a8aFx815MaRu5cs3ZT5LnCA --- diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index c0ffb1fd8..c7d9502a0 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -60,6 +60,9 @@ extern const char *specific_interface; #if defined(CMSG_FIRSTHDR) #define HAVE_TIMESTAMP #define USE_TIMESTAMP_CMSG +#ifndef TIMESTAMP_CTLMSGBUF_SIZE +#define TIMESTAMP_CTLMSGBUF_SIZE 1536 /* moderate default */ +#endif #else /* fill in for old/other timestamp interfaces */ #endif @@ -2706,7 +2709,7 @@ read_network_packet(SOCKET fd, struct interface *itf, l_fp ts) #ifdef HAVE_TIMESTAMP struct msghdr msghdr; struct iovec iovec; - char control[5120]; /* pick up control messages */ + char control[TIMESTAMP_CTLMSGBUF_SIZE]; /* pick up control messages */ #endif /*