SCCS-vsn: sys/netinet/in.h 6.9
SCCS-vsn: sys/netinet/in_pcb.c 6.11
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)in.h 6.8 (Berkeley) %G%
+ * @(#)in.h 6.9 (Berkeley) %G%
/*
* Ports < IPPORT_RESERVED are reserved for
* privileged processes (e.g. root).
/*
* Ports < IPPORT_RESERVED are reserved for
* privileged processes (e.g. root).
+ * Ports > IPPORT_USERRESERVED are reserved
+ * for servers, not necessarily privileged.
*/
#define IPPORT_RESERVED 1024
*/
#define IPPORT_RESERVED 1024
+#define IPPORT_USERRESERVED 5000
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)in_pcb.c 6.10 (Berkeley) %G%
+ * @(#)in_pcb.c 6.11 (Berkeley) %G%
noname:
if (lport == 0)
do {
noname:
if (lport == 0)
do {
- if (head->inp_lport++ < IPPORT_RESERVED)
+ if (head->inp_lport++ < IPPORT_RESERVED ||
+ head->inp_lport > IPPORT_USERRESERVED)
head->inp_lport = IPPORT_RESERVED;
lport = htons(head->inp_lport);
} while (in_pcblookup(head,
head->inp_lport = IPPORT_RESERVED;
lport = htons(head->inp_lport);
} while (in_pcblookup(head,