>Number: 186449 >Category: kern >Synopsis: ifconfig(8) fails to autoload if_tap.ko when creating vmnet >interface >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 04 12:10:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Valentin Davydov >Release: 10.0-STABLE >Organization: State Optical Institute >Environment: FreeBSD pv.local 10.0-STABLE FreeBSD 10.0-STABLE #6 r261230: Tue Jan 28 22:12:46 MSK 2014 val@pv.local:/usr/obj/usr/src/sys/GENERIC amd64 >Description: ifconfig(8) utility has an ability to automatically load necessary kernel module when creating first instance of a new (say, dynamic) interface. Sometimes it works (e.g. ifconfig crate tap0) and sometimes doesn't (ifconfig create vmnet0). >How-To-Repeat: Boot with a clean GENERIC kernel. Become root. Say "ifconfig vmnet0 create". You should get "ifconfig: SIOCIFCREATE2: Invalid argument" diagnostics. At the same time "ifconfig tap0 create" works as expected (as well as "ifconfig vmnetN create" afterwards, when if_tap.ko is already loaded). >Fix: This problem is most probably caused by the ifmaybeload() function. It implicitly derives kernel module name from the interface name by removing numerical suffix and prepending "if_" prefix. Whereas both tap and vmnet interfaces share the same if_tap.ko kernel module, and there is no seperate if_vmnet.ko one.
Possible workaround (successfully tested): during installkernel make a copy (or hardlink) of if_tap.ko under the name if_vmnet.ko, that works fine. By the way, it makes sense to hardlink tap(4) and vmnet(4) manual pages too. Comment: I woudn't dare recommend suggested workaround as an ultimate solution because of possible unforeseen pitfalls (such as filesystems incapable of hardlinks etc.). >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"