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)
Dec 20 2023, 2:15 AM
Unknown Object (File)
Nov 8 2023, 3:06 PM
Unknown Object (File)
Nov 8 2023, 4:14 AM
Unknown Object (File)
Oct 7 2023, 1:57 PM
Unknown Object (File)
Sep 15 2023, 10:02 AM
Unknown Object (File)
Sep 4 2023, 7:22 AM
Unknown Object (File)
Aug 25 2023, 11:43 PM
Unknown Object (File)
Aug 13 2023, 1:28 PM
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