Browse Source

Fixing several timeout quirks at tftpd and tftp:

- move TIMEOUT* defines to arpa/tftp.h, as they are used several times
in tftpd and tftp, and the values are part of the RFC definition.
- tftpd and tftp did count the total retransmission time in retries
instead in seconds.  fixed.
- tftpd rexmt timeout was hardcoded by a define and therefore didn't
changed when the timeout option was sent.  fixed.
- limit total retransmission timeout in tftp to also 255 seconds.
- replace obvious atoi()'s by strtonum().
ok claudio@
OPENBSD_4_0
mglocker 18 years ago
parent
commit
f8d26986fd
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/include/arpa/tftp.h

+ 4
- 1
src/include/arpa/tftp.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: tftp.h,v 1.6 2006/07/20 09:42:44 mglocker Exp $ */
/* $OpenBSD: tftp.h,v 1.7 2006/07/26 09:10:03 mglocker Exp $ */
/* $NetBSD: tftp.h,v 1.3 1994/10/26 00:56:48 cgd Exp $ */
/*
@ -41,6 +41,9 @@
#define SEGSIZE 512 /* data segment size */
#define SEGSIZE_MIN 8 /* minimal data segment size */
#define SEGSIZE_MAX 65464 /* maximal data segment size */
#define TIMEOUT 5 /* packet rexmt timeout */
#define TIMEOUT_MIN 1 /* minimal packet rexmt timeout */
#define TIMEOUT_MAX 255 /* maximal packet rexmt timeout */
/*
* Packet types.


Loading…
Cancel
Save