Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Don't increment ip_nfragpackets when failed to a...
details: https://anonhg.NetBSD.org/src/rev/56e8e3d8eac5
branches: trunk
changeset: 766546:56e8e3d8eac5
user: enami <enami%NetBSD.org@localhost>
date: Mon Jun 27 00:45:50 2011 +0000
description:
Don't increment ip_nfragpackets when failed to allocate fragment queue.
No one will decrement it on such case.
diffstat:
sys/netinet/ip_reass.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 90958ab44943 -r 56e8e3d8eac5 sys/netinet/ip_reass.c
--- a/sys/netinet/ip_reass.c Sun Jun 26 22:27:14 2011 +0000
+++ b/sys/netinet/ip_reass.c Mon Jun 27 00:45:50 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_reass.c,v 1.7 2010/11/05 00:21:51 rmind Exp $ */
+/* $NetBSD: ip_reass.c,v 1.8 2011/06/27 00:45:50 enami Exp $ */
/*
* Copyright (c) 1982, 1986, 1988, 1993
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_reass.c,v 1.7 2010/11/05 00:21:51 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_reass.c,v 1.8 2011/06/27 00:45:50 enami Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -267,11 +267,11 @@
else if (ip_nfragpackets >= ip_maxfragpackets) {
goto dropfrag;
}
- ip_nfragpackets++;
fp = malloc(sizeof(ipfr_queue_t), M_FTABLE, M_NOWAIT);
if (fp == NULL) {
goto dropfrag;
}
+ ip_nfragpackets++;
TAILQ_INIT(&fp->ipq_fragq);
fp->ipq_nfrags = 1;
fp->ipq_ttl = IPFRAGTTL;
Home |
Main Index |
Thread Index |
Old Index