History log of /src/usr.sbin/timed/timed/readmsg.c |
Revision | | Date | Author | Comments |
1.23 |
| 11-Aug-2017 |
ginsbach | PR bin/42464: Timothy McIntosh: Fix timed interoperability
Fix is a combination of FreeBSD fix and submitted patch.
[From the FreeBSD change] The timed protocol is not implemented in a compatible way by all vendors; the size of the tsp_name field is OS-dependent. 4.3BSD used a 32-byte field, FreeBSD uses MAXHOSTNAMELEN and RedHat apparently uses a 64-byte field. As a result, sanity checking code added a few months ago to detect short packets will fail when interoperating with one of these other vendors.
Change the short packet detection code to expect a minimum packet size corresponding to the 4.3BSD implementation, which should be a safe minimum size.
|
1.22 |
| 16-Feb-2008 |
matt | Change/fix tsptype to const char * const [];
|
1.21 |
| 04-Feb-2007 |
cbiere | branches: 1.21.4; * timed and timedc: * Sprinkle const. * Use EXIT_FAILURE instead of 1. * Use err(), errx(). * Use calloc() instead of malloc()+memset(). * timedc: * Non-terminated hostnames or unknown tsp_type could cause a crash due to out-of-bounds reads in msite(). * Check the received packet size. * Merged duplicated code into functions. * Moved variables into the relevant scopes. * Use connect() so that only the receiver can reply, send()/recv() can be used and rejected packets are immediately noticed by recv() instead of causing timeouts. * Updated manpage.
|
1.20 |
| 26-Jan-2007 |
christos | - centralize sendto tsp - cleanup some casts
|
1.19 |
| 25-Jan-2007 |
cbiere | * Modified in_cksum() so it can handle unaligned data. * Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because strlcpy() could potentially run out-of-bounds and doesn't zero out unused buffer space. * Replaced bcopy/bzero() with memcpy/memset(). * Fixed potential alignment/aliasing issues in measure(). * Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate. * Renamed sin to addr because sin is a reserved identifier. * Use bindresvport() instead of looping over bind(); rresvport() returns a SOCK_STREAM socket not SOCK_DGRAM.
|
1.18 |
| 09-May-2006 |
mrg | change (mostly) int to socklen_t. GCC 4 doesn't like that int and socklen_t are different signness.
|
1.17 |
| 06-Feb-2005 |
perry | remove obsolete register declarations.
|
1.16 |
| 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.15 |
| 17-May-2003 |
itojun | use strlcpy
|
1.14 |
| 16-May-2003 |
itojun | avoid possible buffer overrun
|
1.13 |
| 19-Sep-2002 |
mycroft | select() -> poll(), nanosleep()
|
1.12 |
| 06-Jul-2002 |
wiz | ANSIfy, remove __P().
|
1.11 |
| 02-Sep-2001 |
reinoud | Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the code considerably and was mainly providing SGI specific logging facilities and some hacks to improve the relyablility on SGI systems by increasing priorities etc...
|
1.10 |
| 13-Mar-2001 |
itojun | cope with malformed packets better. ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-01:28/timed.patch
|
1.9 |
| 27-Mar-2000 |
kleink | branches: 1.9.4; Cast timeval members to types we know the printf conversions of.
|
1.8 |
| 10-Sep-1999 |
simonb | s/acknowledgment/acknowledgement/
|
1.7 |
| 17-Oct-1997 |
lukem | WARNSify
|
1.6 |
| 17-Oct-1997 |
mrg | merge lite-2
|
1.5 |
| 07-Jun-1995 |
cgd | typeof(timeval.tv_sec) != time_t
|
1.4 |
| 21-Mar-1995 |
mycroft | Update to use timer{add,sub}().
|
1.3 |
| 03-Nov-1993 |
cgd | update timed to the latest version, as supplied and ported by <Vernon Schryver> vjs@calcite.rhyolite.com.
|
1.2 |
| 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 |
| 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.2 |
| 06-Jun-1993 |
mrg | 4.4BSD-Lite2
|
1.1.1.1 |
| 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.9.4.1 |
| 21-Apr-2001 |
he | Pull up revision 1.10 (requested by soda): Fix remote denial-of-service problem related to mishandling of malformed messages.
|
1.21.4.1 |
| 23-Mar-2008 |
matt | sync with HEAD
|