diff options
author | 2018-06-25 11:11:41 +0000 | |
---|---|---|
committer | 2018-06-25 11:11:41 +0000 | |
commit | 9db2ceadd37c9bd7024fe1997dfe03f2361e9449 (patch) | |
tree | bd34b5b4d0fc559c4a7227406826aff503f70c17 | |
parent | Push the NET_LOCK() down in pfkeyv2_send(). (diff) | |
download | wireguard-openbsd-9db2ceadd37c9bd7024fe1997dfe03f2361e9449.tar.xz wireguard-openbsd-9db2ceadd37c9bd7024fe1997dfe03f2361e9449.zip |
Assert that the NET_LOCK() is held when iterating over `ipsec_acquire_head'.
ok visa@ as part of a larger bigger diff
-rw-r--r-- | sys/netinet/ip_spd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c index c6c9b88c771..b1b69e446e1 100644 --- a/sys/netinet/ip_spd.c +++ b/sys/netinet/ip_spd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_spd.c,v 1.97 2018/05/16 13:19:00 reyk Exp $ */ +/* $OpenBSD: ip_spd.c,v 1.98 2018/06/25 11:11:41 mpi Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -848,6 +848,8 @@ ipsec_get_acquire(u_int32_t seq) { struct ipsec_acquire *ipa; + NET_ASSERT_LOCKED(); + TAILQ_FOREACH (ipa, &ipsec_acquire_head, ipa_next) if (ipa->ipa_seq == seq) return ipa; |