Page MenuHomeFreeBSD

Make if_enc and if_ipsec kernel modules loadable by ifconfig(8)
ClosedPublic

Authored by ae on May 6 2019, 8:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 10, 2:17 AM
Unknown Object (File)
Nov 29 2024, 7:25 AM
Unknown Object (File)
Nov 25 2024, 11:28 PM
Unknown Object (File)
Nov 25 2024, 9:52 AM
Unknown Object (File)
Nov 23 2024, 11:27 PM
Unknown Object (File)
Nov 20 2024, 5:57 AM
Unknown Object (File)
Nov 13 2024, 6:04 PM
Unknown Object (File)
Nov 8 2024, 7:10 AM
Subscribers

Details

Summary

Currently we have ipsec.ko and if_enc.ko kernel modules, that contain cloners for if_ipsec(4) and if_enc(4) virtual interfaces. But ifconfig can not automatically load kernel modules, when user run ifconfig command.
The kernel has "enc" driver, and ifconfig refuses to load if_enc(4). I renamed "enc" to "ses". It seems there are no strong dependency from the name.
To be able create if_ipsec(4) interfaces, I added symlink if_ipsec.ko->ipsec.ko. And now it is possible to automatically load both if_enc and if_ipsec modules with ifconfig command.

Test Plan
# kldstat -v | egrep "ses|enc|ipsec"
		208 ipsec_support
		 20 ses
# ifconfig enc0
enc0: flags=0<> metric 0 mtu 1536
	groups: enc
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
# kldstat -v | egrep "ses|enc|ipsec"
		208 ipsec_support
		 20 ses
22    1 0xffffffff821c1000      b10 if_enc.ko (/boot/kernel/if_enc.ko)
		281 if_enc
# ifconfig ipsec0 create
# kldstat -v | egrep "ses|enc|ipsec"
		208 ipsec_support
		 20 ses
22    1 0xffffffff821c1000      b10 if_enc.ko (/boot/kernel/if_enc.ko)
		281 if_enc
23    1 0xffffffff821c2000     c8e0 if_ipsec.ko (/boot/kernel/if_ipsec.ko)
		283 ipsec

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable