]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r347241 (partial), r347392, r347429: ifconfig(8) ifname <-> kld mapping
authorKyle Evans <kevans@FreeBSD.org>
Tue, 14 May 2019 02:00:12 +0000 (02:00 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 14 May 2019 02:00:12 +0000 (02:00 +0000)
commitbbe165e404500463cc127ae280ecfb8352c731a0
treea9a737a43f5223dec0aaa2251569ad2252bc7844
parent1451ae75dbc81d84924c54dbbe7d1045bb1162bd
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