Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/net/npf Pull up following revision(s) (requested by r...
details: https://anonhg.NetBSD.org/src/rev/1c472311911d
branches: netbsd-7
changeset: 799081:1c472311911d
user: snj <snj%NetBSD.org@localhost>
date: Sun Mar 15 22:41:24 2015 +0000
description:
Pull up following revision(s) (requested by rmind in ticket #586):
sys/net/npf/npf_conn.c: revision 1.16
npf_conn_establish: fix the previous change - drop the reference on error.
diffstat:
sys/net/npf/npf_conn.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 93f0eecc893f -r 1c472311911d sys/net/npf/npf_conn.c
--- a/sys/net/npf/npf_conn.c Sun Mar 15 22:39:58 2015 +0000
+++ b/sys/net/npf/npf_conn.c Sun Mar 15 22:41:24 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf_conn.c,v 1.10.2.4 2015/02/04 07:13:04 snj Exp $ */
+/* $NetBSD: npf_conn.c,v 1.10.2.5 2015/03/15 22:41:24 snj Exp $ */
/*-
* Copyright (c) 2014-2015 Mindaugas Rasiukevicius <rmind at netbsd org>
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.10.2.4 2015/02/04 07:13:04 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.10.2.5 2015/03/15 22:41:24 snj Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -528,8 +528,8 @@
* here since there might be references acquired already.
*/
if (error) {
- const u_int dflags = CONN_REMOVED | CONN_EXPIRE;
- atomic_or_uint(&con->c_flags, dflags);
+ atomic_or_uint(&con->c_flags, CONN_REMOVED | CONN_EXPIRE);
+ atomic_dec_uint(&con->c_refcnt);
npf_stats_inc(NPF_STAT_RACE_CONN);
} else {
NPF_PRINTF(("NPF: establish conn %p\n", con));
@@ -569,6 +569,8 @@
/*
* npf_conn_setnat: associate NAT entry with the connection, update and
* re-insert connection entry using the translation values.
+ *
+ * => The caller must be holding a reference.
*/
int
npf_conn_setnat(const npf_cache_t *npc, npf_conn_t *con,
Home |
Main Index |
Thread Index |
Old Index