summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-08-15 16:40:27 +0000
committeryar <yar@FreeBSD.org>2006-08-15 16:40:27 +0000
commit250b1cf39906d95f6f2fbfedd093eedd894a032d (patch)
tree91a81a01ba926620b261a5edeec39b1c1df266d3 /sys/net
parent0f33eed4fd39e838d0aff6f5839aeaeb1875159b (diff)
downloadFreeBSD-src-250b1cf39906d95f6f2fbfedd093eedd894a032d.zip
FreeBSD-src-250b1cf39906d95f6f2fbfedd093eedd894a032d.tar.gz
Set IFF_DRV_RUNNING on vlan(4) once in vlan_config(),
not at many places after each call to vlan_config(). This is consistent with IFF_DRV_RUNNING being unset in vlan_unconfig().
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_vlan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 498d2a2..fb19266 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -744,7 +744,6 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
return (error);
}
- ifp->if_drv_flags |= IFF_DRV_RUNNING;
/* Update flags on the parent, if necessary. */
vlan_setflags(ifp, 1);
@@ -1113,6 +1112,9 @@ exists:
* joined on the vlan device.
*/
(void)vlan_setmulti(ifp); /* XXX: VLAN lock held */
+
+ /* We are ready for operation now. */
+ ifp->if_drv_flags |= IFF_DRV_RUNNING;
done:
TRUNK_UNLOCK(trunk);
VLAN_UNLOCK();
@@ -1443,7 +1445,6 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = vlan_config(ifv, p, vlr.vlr_tag);
if (error)
break;
- ifp->if_drv_flags |= IFF_DRV_RUNNING;
/* Update flags on the parent, if necessary. */
vlan_setflags(ifp, 1);
OpenPOWER on IntegriCloud