Differentiate between addifaddr and delifaddr for the privilege check.
Reviewed by: rwatson MFC after: 2 weeks
This commit is contained in:
parent
c4579b502b
commit
107d12440a
@ -294,7 +294,8 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
|
||||
case SIOCSIFNETMASK:
|
||||
case SIOCSIFDSTADDR:
|
||||
if (td != NULL) {
|
||||
error = priv_check(td, PRIV_NET_ADDIFADDR);
|
||||
error = priv_check(td, (cmd == SIOCDIFADDR) ?
|
||||
PRIV_NET_DELIFADDR : PRIV_NET_ADDIFADDR);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user