summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1997-08-09 23:36:25 +0000
committermillert <millert@openbsd.org>1997-08-09 23:36:25 +0000
commit4a304dbaae73ec8f00e51fba676c2b12295e3b5d (patch)
treef2594d420eb94b1719da25df0aa9b6d9045835c1 /sys/netinet/udp_usrreq.c
parentFix some minor stuff and flesh out a bit. (diff)
downloadwireguard-openbsd-4a304dbaae73ec8f00e51fba676c2b12295e3b5d.tar.xz
wireguard-openbsd-4a304dbaae73ec8f00e51fba676c2b12295e3b5d.zip
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/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 9ec5b2ce0e7..eed1e4db382 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.11 1997/07/24 00:31:15 deraadt Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.12 1997/08/09 23:36:28 millert Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -82,6 +82,9 @@ static struct mbuf *udp_saveopt __P((caddr_t, int, int));
#endif
int udbhashsize = UDBHASHSIZE;
+/* from in_pcb.c */
+extern struct baddynamicports baddynamicports;
+
void
udp_init()
{
@@ -682,6 +685,9 @@ udp_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
switch (name[0]) {
case UDPCTL_CHECKSUM:
return (sysctl_int(oldp, oldlenp, newp, newlen, &udpcksum));
+ case UDPCTL_BADDYNAMIC:
+ return (sysctl_struct(oldp, oldlenp, newp, newlen,
+ baddynamicports.udp, sizeof(baddynamicports.udp)));
default:
return (ENOPROTOOPT);
}