From 478be4cc1161209209ffa85a6304ee785249dde2 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 6 Dec 2004 02:46:35 +0000 Subject: also consider NFS_PORT to be a reserved port, as in 1.18 or something like that. --- sys/netinet/in_pcb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sys') 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 #include +#include +#include + #ifdef INET6 #include #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)); -- cgit v1.2.3