Bug 200710 - sysutils/grub2-bhyve: always creates tap0 interface
Summary: sysutils/grub2-bhyve: always creates tap0 interface
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Peter Grehan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-08 13:46 UTC by Jimmy Olgeni
Modified: 2015-07-20 22:47 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (kmoore)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmy Olgeni freebsd_committer freebsd_triage 2015-06-08 13:46:54 UTC
In grub-core/net/drivers/emu/emunet.c there is this check:

#ifdef __FreeBSD__
  fd = open ("/dev/tap0", O_RDWR | O_NONBLOCK);
  if (fd < 0)
    return;
#endif

It will always cause tap0 to be created, even if it will not be used by bhyve because a different tap interface has been allocated by "ifconfig tap create".

If this check is really necessary then it would be great if a different tap device could be specified somehow (perhaps with an environment variable to avoid changing the code too much)

What do you think?
Comment 1 Kris Moore freebsd_committer freebsd_triage 2015-06-08 13:49:42 UTC
Assigned to Peter, since he handles the grub-bhyve development upstream.
Comment 2 Peter Grehan freebsd_committer freebsd_triage 2015-06-09 02:14:29 UTC
Yeh, no need for that code: it was prototype stuff to see if grub networking was Ok.

I'll see if it's easy to control with an option: otherwise, I'll just remove it.
Comment 3 Peter Grehan freebsd_committer freebsd_triage 2015-07-20 22:47:10 UTC
Fixed (well, disabled) upstream with
 https://github.com/grehan-freebsd/grub2-bhyve/commit/dcb98890bf3ca1c0e166bccb5ed8b313695bf507