Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Feb 1996 13:32:26 -0800 (PST)
From:      Peter Wemm <peter>
To:        CVS-committers, cvs-all, cvs-sys
Subject:   cvs commit:  src/sys/netinet in.h in_pcb.c in_pcb.h ip_output.c
Message-ID:  <199602222132.NAA20639@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
peter       96/02/22 13:32:25

  Modified:    sys/netinet  in.h in_pcb.c in_pcb.h ip_output.c
  Log:
  Make the default behavior of local port assignment match traditional
  systems (my last change did not mix well with some firewall
  configurations).  As much as I dislike firewalls, this is one thing I
  I was not prepared to break by default.. :-)
  
  Allow the user to nominate one of three ranges of port numbers as
  candidates for selecting a local address to replace a zero port number.
  The ranges are selected via a setsockopt(s, IPPROTO_IP, IP_PORTRANGE, &arg)
  call.  The three ranges are: default, high (to bypass firewalls) and
  low (to get a port below 1024).
  
  The default and high port ranges are sysctl settable under sysctl
  net.inet.ip.portrange.*
  
  This code also fixes a potential deadlock if the system accidently ran out
  of local port addresses. It'd drop into an infinite while loop.
  
  The secure port selection (for root) should reduce overheads and increase
  reliability of rlogin/rlogind/rsh/rshd if they are modified to take
  advantage of it.
  
  Partly suggested by: pst
  Reviewed by: wollman
  
  Revision  Changes    Path
  1.15      +48 -14    src/sys/netinet/in.h
  1.17      +68 -14    src/sys/netinet/in_pcb.c
  1.11      +3 -1      src/sys/netinet/in_pcb.h
  1.28      +44 -1     src/sys/netinet/ip_output.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602222132.NAA20639>