]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ifconfig: abort if loading a module fails other than for ENOENT
authorAlan Somers <asomers@FreeBSD.org>
Mon, 26 Dec 2022 02:06:21 +0000 (19:06 -0700)
committerAlan Somers <asomers@FreeBSD.org>
Tue, 10 Jan 2023 02:56:18 +0000 (19:56 -0700)
commit2c24ad3377a6f584e484656db8390e4eb7cfc119
treebbd47c44116111d1b9d224a9320031fd24042ca4
parenteb3f9a7aece9473d678adddcf6aefe6c1eec0ac4
ifconfig: abort if loading a module fails other than for ENOENT

If "ifconfig create" tries to load a kernel module, and the module
exists but can't be loaded, fail the command with a useful error
message.  This is helpful, for example, when trying to create a cloned
interface in a vnet jail.  But ignore ENOENT, because sometimes ifconfig
can't correctly guess the name of the required kernel module.

MFC after: 2 weeks
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D37873
sbin/ifconfig/ifconfig.c