Solved Unable to create epair / can't load if_epair

Hi here!

I am trying to setup a server for a webapp with FreeBSD 12.1 with some jails and I ran into an issue. When trying to create an epair manually with ifconfig, I have this error:

Code:
ifconfig: SIOCIFCREATE2: Invalid argument

I did some further digging and verified if the if_epair kernel module is correctly is loaded: it turns out there is an issue at this level.

Code:
# kldload if_epaif
kldload: an error occurred while loading module if_epair. Please check dmesg(8) for more details.

and the dmesg:
Code:
...
link_elf_obj: symbol if_clone_addif undefined
linker_load_file: /boot/kernel/if_epair.ko - unsupported file type

Some more context: this server is a VM running on a Linux host using qemu for virtualization. I tried it on my home server too using FreeBSD and bhyve and it worked smoothly. My bet would be this has something to do with the way qemu virtualize the network stack - but I'm by no means an expert in the area.

Does anyone have any idea? Any help will be greatly appreciated!
 
My bet would be this has something to do with the way qemu virtualize the network stack - but I'm by no means an expert in the area.
Unlikely, those epair(4) interfaces are virtual interfaces, local only to the machine. The host has zero influence on that.

Code:
link_elf_obj: symbol if_clone_addif undefined
linker_load_file: /boot/kernel/if_epair.ko - unsupported file type
I suspect those files are corrupt or otherwise mangled (maybe the modules are out of sync with the kernel).
 
Indeed. You are right. Stupid error from my side: my ansible scripts I use to configure this server did an update without rebooting...

Thanks for the help anyway!
 
Back
Top