netdump: Check the return value of ifunit_ref()
We may fail to match if the specific interface doesn't exist or was renamed. PR: 273715 Reported by: grembo MFC after: 1 week
This commit is contained in:
parent
e61568aeee
commit
d94d07d581
|
@ -451,6 +451,8 @@ netdump_configure(struct diocskerneldump_arg *conf, struct thread *td)
|
|||
CURVNET_SET(vnet0);
|
||||
ifp = ifunit_ref(conf->kda_iface);
|
||||
CURVNET_RESTORE();
|
||||
if (ifp == NULL)
|
||||
return (ENODEV);
|
||||
if (!DEBUGNET_SUPPORTED_NIC(ifp)) {
|
||||
if_rele(ifp);
|
||||
return (ENODEV);
|
||||
|
|
Loading…
Reference in New Issue