SIOCSIFFLAGS doesn't require an argument in kernel land; instead, flags

are supposed to be set directly in ifnet already.  This change fixes a
panic when ng_eiface node is attached to ng_fec node and the latter is
shut down (ng_fec sets flags and then calls SIOCSIFFLAGS with a NULL
argument).

MFC after:	3 days
This commit is contained in:
Ruslan Ermilov 2006-09-15 15:53:09 +00:00
parent aed8e389c1
commit 3d82b87057

View File

@ -145,7 +145,7 @@ ng_eiface_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
* If the interface is marked up and stopped, then start it.
* If it is marked down and running, then stop it.
*/
if (ifr->ifr_flags & IFF_UP) {
if (ifp->if_flags & IFF_UP) {
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE);
ifp->if_drv_flags |= IFF_DRV_RUNNING;