Drop received packets unless IFF_RUNNING is set. When hvn(4) attaches
authorpatrick <patrick@openbsd.org>
Fri, 11 Jun 2021 12:47:15 +0000 (12:47 +0000)
committerpatrick <patrick@openbsd.org>
Fri, 11 Jun 2021 12:47:15 +0000 (12:47 +0000)
commite977d71dc7bcffaea79a6da18dc485c9ad51f35d
treeb660a77147ca0461433f12f3ea510b5dd57722e9
parentad1c997dea572e18760fc55e20d73bd27f145c9f
Drop received packets unless IFF_RUNNING is set.  When hvn(4) attaches
it sends commands and waits for replies to come back in.  The receive
pipe seems to contain both command completions and data packets.  When
waiting for command completion during hvn(4) attach, it's possible for
packets to show up as well.  We shouldn't call if_input() if hvn(4) is
not set up, so drop them when we're not running.

ok mikeb@
sys/dev/pv/if_hvn.c