Wrap by netlock the whole foreach loop which calls switch_port_detach() in
authormvs <mvs@openbsd.org>
Tue, 23 Feb 2021 15:13:58 +0000 (15:13 +0000)
committermvs <mvs@openbsd.org>
Tue, 23 Feb 2021 15:13:58 +0000 (15:13 +0000)
commit1d0e1a71fb1b89e2297349602129b314705c00ba
treeaa965570f0cbfc524aa309fc0fae56acc7b799bb
parent692659c5febf7889a42981152110464e8012b268
Wrap by netlock the whole foreach loop which calls switch_port_detach() in
switch_clone_destroy(). This fixes netlock assertion within underlay
ifpromisc(). The problem was reported by hrvoje@ [1].

"why not" by deraadt@

1. https://marc.info/?l=openbsd-bugs&m=161338077403538&w=2
sys/net/if_switch.c