Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if.c
Show First 20 Lines • Show All 3,157 Lines • ▼ Show 20 Lines | #endif | ||||
* Pass the request on to the socket control method, and if the | * Pass the request on to the socket control method, and if the | ||||
* latter returns EOPNOTSUPP, directly to the interface. | * latter returns EOPNOTSUPP, directly to the interface. | ||||
* | * | ||||
* Make an exception for the legacy SIOCSIF* requests. Drivers | * Make an exception for the legacy SIOCSIF* requests. Drivers | ||||
* trust SIOCSIFADDR et al to come from an already privileged | * trust SIOCSIFADDR et al to come from an already privileged | ||||
* layer, and do not perform any credentials checks or input | * layer, and do not perform any credentials checks or input | ||||
* validation. | * validation. | ||||
*/ | */ | ||||
error = ((*so->so_proto->pr_usrreqs->pru_control)(so, cmd, data, | error = so->so_proto->pr_control(so, cmd, data, ifp, td); | ||||
ifp, td)); | |||||
if (error == EOPNOTSUPP && ifp != NULL && ifp->if_ioctl != NULL && | if (error == EOPNOTSUPP && ifp != NULL && ifp->if_ioctl != NULL && | ||||
cmd != SIOCSIFADDR && cmd != SIOCSIFBRDADDR && | cmd != SIOCSIFADDR && cmd != SIOCSIFBRDADDR && | ||||
cmd != SIOCSIFDSTADDR && cmd != SIOCSIFNETMASK) | cmd != SIOCSIFDSTADDR && cmd != SIOCSIFNETMASK) | ||||
error = (*ifp->if_ioctl)(ifp, cmd, data); | error = (*ifp->if_ioctl)(ifp, cmd, data); | ||||
if ((oif_flags ^ ifp->if_flags) & IFF_UP) { | if ((oif_flags ^ ifp->if_flags) & IFF_UP) { | ||||
#ifdef INET6 | #ifdef INET6 | ||||
if (ifp->if_flags & IFF_UP) | if (ifp->if_flags & IFF_UP) | ||||
▲ Show 20 Lines • Show All 1,588 Lines • Show Last 20 Lines |