This comment on various IPPORT_ defines was copied from in.h and
probably never fully applied to IPv6. Over time it has become more stale, so replace it with something more up to date. Reviewed by: ume MFC after: 1 month
This commit is contained in:
parent
85f1f481ab
commit
fe12457335
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157209
@ -77,31 +77,9 @@
|
||||
#define __KAME_VERSION "FreeBSD"
|
||||
|
||||
/*
|
||||
* Local port number conventions:
|
||||
*
|
||||
* Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root),
|
||||
* unless a kernel is compiled with IPNOPRIVPORTS defined.
|
||||
*
|
||||
* When a user does a bind(2) or connect(2) with a port number of zero,
|
||||
* a non-conflicting local port address is chosen.
|
||||
*
|
||||
* The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although
|
||||
* that is settable by sysctl(3); net.inet.ip.anonportmin and
|
||||
* net.inet.ip.anonportmax respectively.
|
||||
*
|
||||
* A user may set the IPPROTO_IP option IP_PORTRANGE to change this
|
||||
* default assignment range.
|
||||
*
|
||||
* The value IP_PORTRANGE_DEFAULT causes the default behavior.
|
||||
*
|
||||
* The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT,
|
||||
* and exists only for FreeBSD compatibility purposes.
|
||||
*
|
||||
* The value IP_PORTRANGE_LOW changes the range to the "low" are
|
||||
* that is (by convention) restricted to privileged processes.
|
||||
* This convention is based on "vouchsafe" principles only.
|
||||
* It is only secure if you trust the remote host to restrict these ports.
|
||||
* The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX.
|
||||
* IPv6 port allocation rules should mirror the IPv4 rules and are controlled
|
||||
* by the the net.inet.ip.portrange sysctl tree. The following defines exist
|
||||
* for compatibility with userland applications that need them.
|
||||
*/
|
||||
#if __BSD_VISIBLE
|
||||
#define IPV6PORT_RESERVED 1024
|
||||
|
Loading…
Reference in New Issue
Block a user