mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
ifnet_byindex_ref() requires network epoch.
This commit is contained in:
parent
ff3cfc330e
commit
caeeeaa7c5
1 changed files with 3 additions and 0 deletions
|
|
@ -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 a new issue