diff options
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index ebe573a28fd..ddb4c5bb1ce 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.184 2008/12/11 16:45:45 deraadt Exp $ */ +/* $OpenBSD: if.c,v 1.185 2008/12/12 22:07:33 claudio Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1381,6 +1381,18 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) } break; + case SIOCGIFPRIORITY: + ifr->ifr_metric = ifp->if_priority; + break; + + case SIOCSIFPRIORITY: + if ((error = suser(p, 0)) != 0) + return (error); + if (ifr->ifr_metric < 0 || ifr->ifr_metric > 15) + return (EINVAL); + ifp->if_priority = ifr->ifr_metric; + break; + case SIOCAIFGROUP: if ((error = suser(p, 0))) return (error); |