summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-08-09 23:36:32 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-08-09 23:36:32 +0000
commit00044cdf00f6574a29f0961b4746b80f7926ba78 (patch)
tree8ee1c0443504b7834fed8e070fb8536e8b15561a /sys/netinet/tcp_usrreq.c
parent812760c22318b1d16957febbc72e980ec5505778 (diff)
The list of tcp/udp ports not to allocate dynamically is now
a bitmask configurable via sysctl([38]). The default values have not changed. If one wants to change the list it should be done early on in /etc/rc.
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index c9741a1c230..99c02ed1fa1 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.11 1997/07/24 00:25:25 deraadt Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.12 1997/08/09 23:36:26 millert Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -75,6 +75,9 @@
extern char *tcpstates[];
extern int tcptv_keep_init;
+/* from in_pcb.c */
+extern struct baddynamicports baddynamicports;
+
/*
* Process a TCP user request for TCP tb. If this is a send request
* then m is the mbuf chain of send data. If this is a timer expiration
@@ -588,6 +591,10 @@ tcp_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
case TCPCTL_SLOWHZ:
return (sysctl_rdint(oldp, oldlenp, newp, PR_SLOWHZ));
+ case TCPCTL_BADDYNAMIC:
+ return (sysctl_struct(oldp, oldlenp, newp, newlen,
+ baddynamicports.tcp, sizeof(baddynamicports.tcp)));
+
default:
return (ENOPROTOOPT);
}