Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net/npf npf_mk_connlist: destroy the connections on erro...
details: https://anonhg.NetBSD.org/src/rev/c948319e6b05
branches: trunk
changeset: 330968:c948319e6b05
user: rmind <rmind%NetBSD.org@localhost>
date: Fri Jul 25 23:07:21 2014 +0000
description:
npf_mk_connlist: destroy the connections on error path.
diffstat:
sys/net/npf/npf_conn.c | 7 +++----
sys/net/npf/npf_conn.h | 3 ++-
sys/net/npf/npf_ctl.c | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
diffs (79 lines):
diff -r 68a88952a7e0 -r c948319e6b05 sys/net/npf/npf_conn.c
--- a/sys/net/npf/npf_conn.c Fri Jul 25 23:05:54 2014 +0000
+++ b/sys/net/npf/npf_conn.c Fri Jul 25 23:07:21 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf_conn.c,v 1.6 2014/07/23 01:25:34 rmind Exp $ */
+/* $NetBSD: npf_conn.c,v 1.7 2014/07/25 23:07:21 rmind Exp $ */
/*-
* Copyright (c) 2014 Mindaugas Rasiukevicius <rmind at netbsd org>
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.6 2014/07/23 01:25:34 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.7 2014/07/25 23:07:21 rmind Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -141,7 +141,6 @@
static pool_cache_t conn_cache __read_mostly;
static kmutex_t conn_lock __cacheline_aligned;
-static void npf_conn_gc(npf_conndb_t *, bool, bool);
static void npf_conn_worker(void);
static void npf_conn_destroy(npf_conn_t *);
@@ -706,7 +705,7 @@
* => If it is a flush request, then destroy all connections.
* => If 'sync' is true, then perform passive serialisation.
*/
-static void
+void
npf_conn_gc(npf_conndb_t *cd, bool flush, bool sync)
{
npf_conn_t *con, *prev, *gclist = NULL;
diff -r 68a88952a7e0 -r c948319e6b05 sys/net/npf/npf_conn.h
--- a/sys/net/npf/npf_conn.h Fri Jul 25 23:05:54 2014 +0000
+++ b/sys/net/npf/npf_conn.h Fri Jul 25 23:07:21 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf_conn.h,v 1.3 2014/07/23 01:25:34 rmind Exp $ */
+/* $NetBSD: npf_conn.h,v 1.4 2014/07/25 23:07:21 rmind Exp $ */
/*-
* Copyright (c) 2009-2014 The NetBSD Foundation, Inc.
@@ -114,6 +114,7 @@
int npf_conn_setnat(const npf_cache_t *, npf_conn_t *,
npf_nat_t *, u_int);
npf_nat_t * npf_conn_retnat(npf_conn_t *, const int, bool *);
+void npf_conn_gc(npf_conndb_t *, bool, bool);
int npf_conn_export(prop_array_t);
int npf_conn_import(npf_conndb_t *, prop_dictionary_t,
npf_ruleset_t *);
diff -r 68a88952a7e0 -r c948319e6b05 sys/net/npf/npf_ctl.c
--- a/sys/net/npf/npf_ctl.c Fri Jul 25 23:05:54 2014 +0000
+++ b/sys/net/npf/npf_ctl.c Fri Jul 25 23:07:21 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf_ctl.c,v 1.35 2014/07/23 01:25:34 rmind Exp $ */
+/* $NetBSD: npf_ctl.c,v 1.36 2014/07/25 23:07:21 rmind Exp $ */
/*-
* Copyright (c) 2009-2014 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_ctl.c,v 1.35 2014/07/23 01:25:34 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_ctl.c,v 1.36 2014/07/25 23:07:21 rmind Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -492,7 +492,7 @@
}
prop_object_iterator_release(it);
if (error) {
- /* FIXME: npf_conn_gc(cd, true, false); */
+ npf_conn_gc(cd, true, false);
npf_conndb_destroy(cd);
} else {
*conndb = cd;
Home |
Main Index |
Thread Index |
Old Index