summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsashan <sashan@openbsd.org>2016-01-26 22:23:15 +0000
committersashan <sashan@openbsd.org>2016-01-26 22:23:15 +0000
commit4fcae7ea3c04eb782d3cda556846cf5c717d23a7 (patch)
treed67c21b802684e855d5c434b8a8ad3f5e85034f6
parentdpme_name and dpme_type are NUL-terminated in Apple code, so use (diff)
downloadwireguard-openbsd-4fcae7ea3c04eb782d3cda556846cf5c717d23a7.tar.xz
wireguard-openbsd-4fcae7ea3c04eb782d3cda556846cf5c717d23a7.zip
- state keys imported by if_pfsync trip refcnt != ~0 Assert
OK mpi@
-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) {