summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index e34aecc..1dd37ec 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1250,6 +1250,12 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td)
ifr->ifr_curcap = ifp->if_capenable;
break;
+#ifdef MAC
+ case SIOCGIFMAC:
+ error = mac_ioctl_ifnet_get(td->td_proc->p_ucred, ifr, ifp);
+ break;
+#endif
+
case SIOCGIFMETRIC:
ifr->ifr_metric = ifp->if_metric;
break;
@@ -1296,6 +1302,12 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td)
(void) (*ifp->if_ioctl)(ifp, cmd, data);
break;
+#ifdef MAC
+ case SIOCSIFMAC:
+ error = mac_ioctl_ifnet_set(td->td_proc->p_ucred, ifr, ifp);
+ break;
+#endif
+
case SIOCSIFMETRIC:
error = suser(td);
if (error)
OpenPOWER on IntegriCloud