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>
This commit is contained in:
parent
212b37ff18
commit
4565cbea29
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35304
@ -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,
|
||||
|
@ -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); } \
|
||||
|
Loading…
Reference in New Issue
Block a user