diff options
author | phk <phk@FreeBSD.org> | 1998-04-19 17:22:30 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-04-19 17:22:30 +0000 |
commit | 0f961b2277a016486da4e8a38c3c8e2e4630944d (patch) | |
tree | dab2408056e73a4bf215898ad9c415387ba1bb78 /sys/netinet | |
parent | 2a0789b2755b8c87f0e0ce2798d896682b923aa4 (diff) | |
download | FreeBSD-src-0f961b2277a016486da4e8a38c3c8e2e4630944d.zip FreeBSD-src-0f961b2277a016486da4e8a38c3c8e2e4630944d.tar.gz |
According to:
ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers
port numbers are divided into three ranges:
0 - 1023 Well Known Ports
1024 - 49151 Registered Ports
49152 - 65535 Dynamic and/or Private Ports
This patch changes the "local port range" from 40000-44999
to the range shown above (plus fix the comment in in_pcb.c).
WARNING: This may have an impact on firewall configurations!
PR: 5402
Reviewed by: phk
Submitted by: Stephen J. Roznowski <sjr@home.net>
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/in.h | 17 | ||||
-rw-r--r-- | sys/netinet/in_pcb.c | 6 |
2 files changed, 17 insertions, 6 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h index 4d5467f..da5c420 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in.h 8.3 (Berkeley) 1/3/94 - * $Id: in.h,v 1.29 1998/02/25 02:14:03 julian Exp $ + * $Id: in.h,v 1.30 1998/02/25 02:35:35 julian Exp $ */ #ifndef _NETINET_IN_H_ @@ -180,6 +180,17 @@ * Such a firewall configuration will generally depend on the use of these * default values. If you change them, you may find your Security * Administrator looking for you with a heavy object. + * + * For a slightly more orthodox text view on this: + * + * ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers + * + * port numbers are divided into three ranges: + * + * 0 - 1023 Well Known Ports + * 1024 - 49151 Registered Ports + * 49152 - 65535 Dynamic and/or Private Ports + * */ /* @@ -194,8 +205,8 @@ /* * Default local port range to use by setting IP_PORTRANGE_HIGH */ -#define IPPORT_HIFIRSTAUTO 40000 -#define IPPORT_HILASTAUTO 44999 +#define IPPORT_HIFIRSTAUTO 49152 +#define IPPORT_HILASTAUTO 65535 /* * Scanning for a free reserved port return a value below IPPORT_RESERVED, diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 6ea3795..15616a7 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95 - * $Id: in_pcb.c,v 1.41 1998/03/28 10:18:21 bde Exp $ + * $Id: in_pcb.c,v 1.42 1998/03/28 10:33:13 bde Exp $ */ #include <sys/param.h> @@ -70,8 +70,8 @@ static int ipport_lowfirstauto = IPPORT_RESERVED - 1; /* 1023 */ static int ipport_lowlastauto = IPPORT_RESERVEDSTART; /* 600 */ static int ipport_firstauto = IPPORT_RESERVED; /* 1024 */ static int ipport_lastauto = IPPORT_USERRESERVED; /* 5000 */ -static int ipport_hifirstauto = IPPORT_HIFIRSTAUTO; /* 40000 */ -static int ipport_hilastauto = IPPORT_HILASTAUTO; /* 44999 */ +static int ipport_hifirstauto = IPPORT_HIFIRSTAUTO; /* 49152 */ +static int ipport_hilastauto = IPPORT_HILASTAUTO; /* 65535 */ #define RANGECHK(var, min, max) \ if ((var) < (min)) { (var) = (min); } \ |