freebsd-skq/sys/netinet
Peter Wemm 33b3ac0633 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
1996-02-22 21:32:23 +00:00
..
icmp_var.h Add lots of useful MIB variables and a few not-so-useful ones for 1995-02-16 00:27:47 +00:00
if_ether.c Make the "arpresolve: can't allocate llinfo" error message 1996-02-20 17:54:17 +00:00
if_ether.h Remove old ballast, clean up a little bit, staticize. 1995-12-09 16:06:54 +00:00
if_fddi.h The last part of the ether_sprint -> %6D change. 1996-01-26 09:29:29 +00:00
igmp_var.h Fix a bunch of spelling errors in the comment fields of 1996-01-30 23:02:38 +00:00
igmp.c Staticize. 1995-12-09 20:43:53 +00:00
igmp.h Kernel side of 3.5 multicast routing code, based on work by Bill Fenner 1995-06-13 17:51:16 +00:00
in_cksum.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
in_pcb.c Make the default behavior of local port assignment match traditional 1996-02-22 21:32:23 +00:00
in_pcb.h Make the default behavior of local port assignment match traditional 1996-02-22 21:32:23 +00:00
in_proto.c #if out unsupported IMP code. 1996-02-08 15:43:35 +00:00
in_rmx.c First piece of fixing ppp/proxy arp problem: 1996-01-23 05:15:30 +00:00
in_systm.h Made idempotent. 1994-08-21 05:27:42 +00:00
in_var.h Provide a direct entry point for IP input. This actually results 1996-02-05 20:36:02 +00:00
in.c Fix a bug where having a process listening to both a INADDR_ANY and a 1996-01-08 20:59:06 +00:00
in.h Make the default behavior of local port assignment match traditional 1996-02-22 21:32:23 +00:00
ip_fw.c Make the sorting of IPFW rules an option. You don't want it to sort them. 1996-02-03 11:48:12 +00:00
ip_fw.h Well..finally..this is the first part..it should take care of 1995-10-01 21:52:50 +00:00
ip_fwdef.c Added $Id$. 1995-07-23 05:36:31 +00:00
ip_icmp.c Uniformized pr_ctlinput protosw functions. The third arg is now `void 1995-12-16 02:14:44 +00:00
ip_icmp.h Fix a bunch of spelling errors in the comment fields of 1996-01-30 23:02:38 +00:00
ip_input.c Provide a direct entry point for IP input. This actually results 1996-02-05 20:36:02 +00:00
ip_mroute.c Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
ip_mroute.h Completed function declarations and/or added prototypes. 1995-12-02 19:38:06 +00:00
ip_output.c Make the default behavior of local port assignment match traditional 1996-02-22 21:32:23 +00:00
ip_var.h Fix a bunch of spelling errors in the comment fields of 1996-01-30 23:02:38 +00:00
ip.h If _IP_VHL is defined, declare a single ip_vhl member in struct ip rather 1995-12-21 21:20:27 +00:00
raw_ip.c Staticize. 1995-12-09 20:43:53 +00:00
tcp_debug.c New style sysctl & staticize alot of stuff. 1995-11-14 20:34:56 +00:00
tcp_debug.h New style sysctl & staticize alot of stuff. 1995-11-14 20:34:56 +00:00
tcp_fsm.h New style sysctl & staticize alot of stuff. 1995-11-14 20:34:56 +00:00
tcp_input.c Fixed bug in Path MTU Discovery that caused the system to have to re- 1996-02-22 11:46:39 +00:00
tcp_output.c Be more conservative when T/TCP extensions are disabled. In particular, 1996-01-17 09:35:23 +00:00
tcp_reass.c Fixed bug in Path MTU Discovery that caused the system to have to re- 1996-02-22 11:46:39 +00:00
tcp_seq.h Finish 4.4-Lite-2 merge: randomize TCP initial sequence numbers 1995-10-03 16:54:17 +00:00
tcp_subr.c Fix a nagging divide-by-zero error resulting from the MTU discovery code 1995-12-20 17:42:28 +00:00
tcp_timer.c Reverse the modification which caused the annoying m_copydata crash: set 1996-01-04 21:34:21 +00:00
tcp_timer.h Fix a bunch of spelling errors in the comment fields of 1996-01-30 23:02:38 +00:00
tcp_timewait.c Fix a nagging divide-by-zero error resulting from the MTU discovery code 1995-12-20 17:42:28 +00:00
tcp_usrreq.c Removed unnecessary #includes of vm stuff. Most of them were once 1995-12-06 23:37:44 +00:00
tcp_var.h Fix a bunch of spelling errors in the comment fields of 1996-01-30 23:02:38 +00:00
tcp.h Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
tcpip.h Merge in T/TCP TCP header file changes. 1995-02-08 20:18:48 +00:00
udp_usrreq.c Uniformized pr_ctlinput protosw functions. The third arg is now `void 1995-12-16 02:14:44 +00:00
udp_var.h Uniformized pr_ctlinput protosw functions. The third arg is now `void 1995-12-16 02:14:44 +00:00
udp.h Made idempotent. 1994-08-21 05:27:42 +00:00