summaryrefslogtreecommitdiff
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-12-06 02:46:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-12-06 02:46:35 +0000
commit478be4cc1161209209ffa85a6304ee785249dde2 (patch)
treec4944655ded67bd43ae493ab05bc1b7142e3a74d /sys/netinet/in_pcb.c
parentdac6fa7a8dc2235360b1b866ed8f69f8f0e140ef (diff)
also consider NFS_PORT to be a reserved port, as in 1.18 or something like
that.
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r--sys/netinet/in_pcb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index da7458a4426..f2243e572cc 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.82 2004/12/06 02:41:43 deraadt Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.83 2004/12/06 02:46:34 deraadt Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -88,6 +88,9 @@
#include <netinet/ip_var.h>
#include <dev/rndvar.h>
+#include <sys/mount.h>
+#include <nfs/nfsproto.h>
+
#ifdef INET6
#include <netinet6/ip6_var.h>
#endif /* INET6 */
@@ -158,6 +161,8 @@ in_baddynamic(port, proto)
switch (proto) {
case IPPROTO_TCP:
+ if (port == NFS_PORT)
+ return (1);
if (port < IPPORT_RESERVED/2 || port >= IPPORT_RESERVED)
return (0);
return (DP_ISSET(baddynamicports.tcp, port));
@@ -166,6 +171,8 @@ in_baddynamic(port, proto)
if (port == udpencap_port)
return (1);
#endif
+ if (port == NFS_PORT)
+ return (1);
if (port < IPPORT_RESERVED/2 || port >= IPPORT_RESERVED)
return (0);
return (DP_ISSET(baddynamicports.udp, port));