if_setrdomain could potentially call if_clone_create recursively in the create
authorhenning <henning@openbsd.org>
Mon, 10 Sep 2018 16:07:20 +0000 (16:07 +0000)
committerhenning <henning@openbsd.org>
Mon, 10 Sep 2018 16:07:20 +0000 (16:07 +0000)
commit4cc6c382050db818c73b4b4df1930d38556647ff
treefd44d7a85616e29cf921c489196d173509b0014c
parent671f98448e7016569b74af012f30ed59e5c4fc00
if_setrdomain could potentially call if_clone_create recursively in the create
rdomain case leading to locking issues and lots of headscratching. turns out
the only case where if_setrdomain could actually create an rdomain and thus
end up with that pattern is the ioctl path.
make if_setrdomain never create an rdomain, return error if it doesn't exist
already, introduce if_createrdomain, and adjust the ioctl path to use it.
ok sashan bluhm claudio
sys/net/if.c