Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/ipf/netinet PR/55137: Kouichi Hashikawa: ip...
details: https://anonhg.NetBSD.org/src/rev/8c9544533e8f
branches: trunk
changeset: 1008898:8c9544533e8f
user: christos <christos%NetBSD.org@localhost>
date: Sun Apr 05 02:51:34 2020 +0000
description:
PR/55137: Kouichi Hashikawa: ipfstat -f incorrect output
- make sure frag is initialized to 0
- initialize ipfr_p field
diffstat:
sys/external/bsd/ipf/netinet/ip_frag.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (50 lines):
diff -r e269d6600803 -r 8c9544533e8f sys/external/bsd/ipf/netinet/ip_frag.c
--- a/sys/external/bsd/ipf/netinet/ip_frag.c Sun Apr 05 02:50:27 2020 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_frag.c Sun Apr 05 02:51:34 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_frag.c,v 1.7 2018/06/03 10:37:23 maxv Exp $ */
+/* $NetBSD: ip_frag.c,v 1.8 2020/04/05 02:51:34 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -86,7 +86,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_frag.c,v 1.7 2018/06/03 10:37:23 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_frag.c,v 1.8 2020/04/05 02:51:34 christos Exp $");
#else
static const char sccsid[] = "@(#)ip_frag.c 1.11 3/24/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: ip_frag.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
@@ -393,6 +393,7 @@
}
}
+ memset(&frag, 0, sizeof(frag));
frag.ipfr_v = fin->fin_v;
idx = fin->fin_v;
frag.ipfr_p = fin->fin_p;
@@ -441,6 +442,7 @@
FBUMPD(ifs_nomem);
return NULL;
}
+ memset(fran, 0, sizeof(*fran));
WRITE_ENTER(lock);
@@ -478,6 +480,7 @@
table[idx] = fra;
bcopy((char *)&frag.ipfr_ifp, (char *)&fra->ipfr_ifp, IPFR_CMPSZ);
fra->ipfr_v = fin->fin_v;
+ fra->ipfr_p = fin->fin_p;
fra->ipfr_ttl = softc->ipf_ticks + softf->ipfr_ttl;
fra->ipfr_firstend = frag.ipfr_firstend;
@@ -655,6 +658,7 @@
*
* build up a hash value to index the table with.
*/
+ memset(&frag, 0, sizeof(frag));
frag.ipfr_v = fin->fin_v;
idx = fin->fin_v;
frag.ipfr_p = fin->fin_p;
Home |
Main Index |
Thread Index |
Old Index