Need to set loader.conf.local variables in specific order

Osc4r

Cadet
Joined
Jun 28, 2020
Messages
6
Hello!!, I'm using pfSense inside a bhyve virtual machine managed with iohyve. This VM has two dedicated NICs that are masked to the FreeNAS host using pptdevs. The host and VM interfaces are Realtek (I know they are not the best for FreeBSD) and I would like to use the Realtek's 1.95 driver for FreeBSD. Here comes the problem:
VMM module must be loaded before if_re module to mask the two interfaces for pfSense, however web gui doesn't allow to specify the order of variables in loader.conf.
If I manually set vmm_load before if_re_load in loader.conf.local, masking works correctly, but obviously, changes are lost on reboot.
Is there any way to solve this problem?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
I have no idea if this will work, but FreeBSD, upon which FreeNAS is built, does have a rudimentary means of sequencing loader.conf entries. You could try setting the following loader tunables:

if_re_load="NO"
vmm_load="YES"
vmm_after="kldload if_re"
 

Osc4r

Cadet
Joined
Jun 28, 2020
Messages
6
Ok, It did the trick!. Only one thing: command in "vmm_after" must be "load" instead of "kldload" to work.

if_re_load="NO"
vmm_load="YES"
vmm_after="load if_re"

Thank you very much Samuel!!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Sonovagun, it actually worked! :grin:
 
Top