diff options
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index c08d494..edc7303 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -994,6 +994,11 @@ ifioctl(so, cmd, data, td) ifr->ifr_flags = ifp->if_flags; break; + case SIOCGIFCAP: + ifr->ifr_reqcap = ifp->if_capabilities; + ifr->ifr_curcap = ifp->if_capenable; + break; + case SIOCGIFMETRIC: ifr->ifr_metric = ifp->if_metric; break; @@ -1031,6 +1036,15 @@ ifioctl(so, cmd, data, td) getmicrotime(&ifp->if_lastchange); break; + case SIOCSIFCAP: + error = suser_td(td); + if (error) + return (error); + if (ifr->ifr_reqcap & ~ifp->if_capabilities) + return (EINVAL); + (void) (*ifp->if_ioctl)(ifp, cmd, data); + break; + case SIOCSIFMETRIC: error = suser_td(td); if (error) |