]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r347241 (partial), r347392, r347429: ifconfig(8) ifname <-> kld mapping
authorkevans <kevans@FreeBSD.org>
Tue, 14 May 2019 02:00:12 +0000 (02:00 +0000)
committerkevans <kevans@FreeBSD.org>
Tue, 14 May 2019 02:00:12 +0000 (02:00 +0000)
commit37308b415bfc611f25f0bcad76830e61bb5a8176
tree006590afc4556aae9efe553fdb0e31ab30c65e30
parenta7146477d8e9d59d068523da3bf014ca1de2bfe8
MFC r347241 (partial), r347392, r347429: ifconfig(8) ifname <-> kld mapping

MFC r347241 (partial): Initial mechanism for mapping ifname <-> kld

if_tun/if_tap mappings have been removed and the vmnet mapping has been
updated to the if_tap module.

MFC r347392: ifconfig(8): Partial revert of r347241

r347241 introduced an ifname <-> kld mapping table, mostly so tun/tap/vmnet
can autoload the correct module on use. It also inadvertently made bogus
some previously valid uses of sizeof().

Revert back to ifkind on the stack for simplicity sake. This reduces the
diff from the previous version of ifmaybeload for easiser auditing.

MFC r347429: ifconfig(8): Add kld mappings for ipsec/enc

Additionally, providing mappings makes the comparison for already loaded
modules a little more strict. This should have been done at initial
introduction, but there was no real reason- however, it proves necessary for
enc which has a standard enc -> if_enc mapping but there also exists an
'enc' module that's actually CAM. The mapping lets us unambiguously
determine the correct module.
sbin/ifconfig/ifconfig.c