aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorMike Silbersack <silby@FreeBSD.org>2003-02-01 05:59:51 +0000
committerMike Silbersack <silby@FreeBSD.org>2003-02-01 05:59:51 +0000
commitecf44c01f447838fa5c7a240a2683b664884f9bc (patch)
tree83369d7cc94b6aa496b3e7b66e6f09cb955c7543 /sys/netinet
parenta33ab077a7466cc173c2f5a1de83e523be334804 (diff)
Notes
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 5ab31c7308fe..1965b025deab 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -722,6 +722,7 @@ ours:
*/
if (ip->ip_off & (IP_MF | IP_OFFMASK)) {
+ /* If maxnipq is 0, never accept fragments. */
if (maxnipq == 0) {
ipstat.ips_fragments++;
ipstat.ips_fragdropped++;
@@ -748,7 +749,6 @@ ours:
/*
* Enforce upper bound on number of fragmented packets
* for which we attempt reassembly;
- * If maxnipq is 0, never accept fragments. (Handled above.)
* If maxnipq is -1, accept all fragments without limitation.
*/
if ((nipq > maxnipq) && (maxnipq > 0)) {
@@ -1216,8 +1216,8 @@ ip_slowtimo()
* (due to the limit being lowered), drain off
* enough to get down to the new limit.
*/
- for (i = 0; i < IPREASS_NHASH; i++) {
- if (maxnipq >= 0) {
+ if (maxnipq > 0 && nipq > maxnipq) {
+ for (i = 0; i < IPREASS_NHASH; i++) {
while (nipq > maxnipq &&
!TAILQ_EMPTY(&ipq[i])) {
ipstat.ips_fragdropped++;