summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorAlexandr Nedvedicky <sashan@cvs.openbsd.org>2016-01-26 22:23:16 +0000
committerAlexandr Nedvedicky <sashan@cvs.openbsd.org>2016-01-26 22:23:16 +0000
commitb41ac71d8dcb5c18f698a51a36b00500d9598ec8 (patch)
treeff8cf938c782e172751350f3d588e0e5f6e0eb41 /sys/net
parente4252267d0f42c2f5db1a2bd1657c029bd09dadb (diff)
- state keys imported by if_pfsync trip refcnt != ~0 Assert
OK mpi@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_pfsync.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index a9679474d28..dfcbb798ba1 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.224 2015/12/05 10:07:55 tedu Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.225 2016/01/26 22:23:15 sashan Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -523,6 +523,7 @@ pfsync_state_import(struct pfsync_state *sp, int flags)
skw->port[0] = sp->key[PF_SK_WIRE].port[0];
skw->port[1] = sp->key[PF_SK_WIRE].port[1];
skw->rdomain = ntohs(sp->key[PF_SK_WIRE].rdomain);
+ PF_REF_INIT(skw->refcnt);
skw->proto = sp->proto;
if (!(skw->af = sp->key[PF_SK_WIRE].af))
skw->af = sp->af;
@@ -532,6 +533,7 @@ pfsync_state_import(struct pfsync_state *sp, int flags)
sks->port[0] = sp->key[PF_SK_STACK].port[0];
sks->port[1] = sp->key[PF_SK_STACK].port[1];
sks->rdomain = ntohs(sp->key[PF_SK_STACK].rdomain);
+ PF_REF_INIT(sks->refcnt);
if (!(sks->af = sp->key[PF_SK_STACK].af))
sks->af = sp->af;
if (sks->af != skw->af) {