Module Name: src Committed By: christos Date: Sat Feb 12 21:23:31 UTC 2011
Modified Files: src/sys/dist/ipf/netinet: ip_nat.c Log Message: Add 1 to the port range so the range is inclusive as documented. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/dist/ipf/netinet/ip_nat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dist/ipf/netinet/ip_nat.c diff -u src/sys/dist/ipf/netinet/ip_nat.c:1.42 src/sys/dist/ipf/netinet/ip_nat.c:1.43 --- src/sys/dist/ipf/netinet/ip_nat.c:1.42 Sat Feb 12 13:14:21 2011 +++ src/sys/dist/ipf/netinet/ip_nat.c Sat Feb 12 16:23:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_nat.c,v 1.42 2011/02/12 18:14:21 christos Exp $ */ +/* $NetBSD: ip_nat.c,v 1.43 2011/02/12 21:23:31 christos Exp $ */ /* * Copyright (C) 1995-2003 by Darren Reed. @@ -120,7 +120,7 @@ #if !defined(lint) #if defined(__NetBSD__) #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.42 2011/02/12 18:14:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.43 2011/02/12 21:23:31 christos Exp $"); #else static const char sccsid[] = "@(#)ip_nat.c 1.11 6/5/96 (C) 1995 Darren Reed"; static const char rcsid[] = "@(#)Id: ip_nat.c,v 2.195.2.130 2010/03/16 02:24:52 darrenr Exp"; @@ -2064,7 +2064,7 @@ port = np->in_pnext; } else { in_port_t d = ntohs(np->in_pmax) - - ntohs(np->in_pmin); + ntohs(np->in_pmin) + 1; if (d) port = ipf_random() % d; else