Subject: first TCP port used
To: None <tech-net@NetBSD.ORG>
From: Michael C. Richardson <mcr@sandelman.ottawa.on.ca>
List: tech-net
Date: 10/05/1997 15:53:29
-----BEGIN PGP SIGNED MESSAGE-----


  In in_pcb.c, in_pcbinit, we set inpt_lastport to
1024. (IPPORT_RESERVED)

  I have been testing kernels over the weekend, and sometimes my
compile/reboo test box cycle is so fast that I wind up reusing a
previous TCP port. When one kernel fails, I reboot that machine with a
known good kernel, and use SSH to copy a new kernel over.

  I'm wondering if there is any value in starting inpt_lastport from a
more "random" value. Maybe:
	(boottime.tv_sec & 0xfff) + IPPORT_RESERVED

   :!mcr!:            |  Network security programming, currently
   Michael Richardson | on contract with SSH IPSEC (http://www.ssh.fi/)
 WWW: mcr@sandelman.ottawa.on.ca. PGP key available.




  

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQB1AwUBNDfwNqZpLyXYhL+BAQEJygL/bLSY6GEVPngyOLW3GdDUyKeJl4fFRwHb
NACYkg30Dbs0NKyBp7+naRjUnyn292Rj0d4nWHHW7tXVnMeXXJbdk6gNTRK7ab9+
zTUWdA7KU5axKfL8CcF+FcQVQicIbcyl
=iuM0
-----END PGP SIGNATURE-----