diff --git a/sys/net/ifdi_if.m b/sys/net/ifdi_if.m index f4a3db5092a..cb24ba36ee6 100644 --- a/sys/net/ifdi_if.m +++ b/sys/net/ifdi_if.m @@ -117,6 +117,12 @@ CODE { { return (false); } + + static int + null_get_downreason(if_ctx_t _ctx __unused, struct ifdownreason *_ifdr __unused) + { + return (ENOTSUP); + } }; # @@ -364,3 +370,8 @@ METHOD bool needs_restart { if_ctx_t _ctx; enum iflib_restart_event _event; } DEFAULT null_needs_restart; + +METHOD int get_downreason { + if_ctx_t _ctx; + struct ifdownreason *_ifdr; +} DEFAULT null_get_downreason; diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 8e2fd257ca7..08282d1799b 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4540,6 +4540,11 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) err = IFDI_PRIV_IOCTL(ctx, command, data); CTX_UNLOCK(ctx); break; + case SIOCGIFDOWNREASON: + CTX_LOCK(ctx); + err = IFDI_GET_DOWNREASON(ctx, (struct ifdownreason *)data); + CTX_UNLOCK(ctx); + break; default: err = ether_ioctl(ifp, command, data); break;