Page MenuHomeFreeBSD

bhyve: net_backends, automatically IFF_UP tap devices
ClosedPublic

Authored by bz on Jul 28 2021, 10:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 12, 7:58 AM
Unknown Object (File)
Dec 6 2022, 12:05 PM
Unknown Object (File)
Nov 28 2022, 2:19 AM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
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
229

Why static?

279

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
229

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.