ifnet_byindex_ref() requires network epoch.
This commit is contained in:
parent
7299f8c33d
commit
1408ed7d50
@ -80,6 +80,7 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax! */
|
||||
u_int namelen = arg2;
|
||||
struct ifnet *ifp;
|
||||
struct ifmibdata ifmd;
|
||||
struct epoch_tracker et;
|
||||
size_t dlen;
|
||||
char *dbuf;
|
||||
|
||||
@ -87,7 +88,9 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax! */
|
||||
return EINVAL;
|
||||
if (name[0] <= 0)
|
||||
return (ENOENT);
|
||||
NET_EPOCH_ENTER(et);
|
||||
ifp = ifnet_byindex_ref(name[0]);
|
||||
NET_EPOCH_EXIT(et);
|
||||
if (ifp == NULL)
|
||||
return (ENOENT);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user