Page MenuHomeFreeBSD

bhyve: net_backends, automatically IFF_UP tap devices
ClosedPublic

Authored by bz on Jul 28 2021, 10:59 PM.

Details

Summary

Rather than relying on the sysctl net.link.tap.up_on_open automatically
try to IFF_UP the opened tap device.
When moving installations a lot in devleopment environments forgetting
to set the sysctl is annoying and having to in first place too.
If you want communications with the outside world and tell bhyve to
create an interfaces then it should be usable as well.

MFC after: 10 days

Test Plan

It worked when I tried.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bz requested review of this revision.Jul 28 2021, 10:59 PM
markj added inline comments.
usr.sbin/bhyve/net_backends.c
228

Why static?

278

Ditto below.

bz marked 2 inline comments as done.
bz edited the test plan for this revision. (Show Details)

Address @markj 's comments.

usr.sbin/bhyve/net_backends.c
228

Because I was tired at 2AM? Sorry.

Thanks, this seems reasonable to me.

This revision is now accepted and ready to land.Jul 29 2021, 3:56 PM

Thanks @markj . Are there any POLA concerns here @grehan or can this go in?

No POLA concerns: this is fine. Thanks bz.