|
Lines 205-210
Link Here
|
| 205 |
bpf_mtap(ifp, m); |
205 |
bpf_mtap(ifp, m); |
| 206 |
|
206 |
|
| 207 |
/* |
207 |
/* |
|
|
208 |
* Do not run parent's if_start() if it's not up, |
| 209 |
* or parent's driver will cause a system crash |
| 210 |
*/ |
| 211 |
if ((p->if_flags & (IFF_UP | IFF_RUNNING)) != |
| 212 |
(IFF_UP | IFF_RUNNING)) { |
| 213 |
m_freem(m); |
| 214 |
ifp->if_data.ifi_collisions++; |
| 215 |
continue; |
| 216 |
} |
| 217 |
|
| 218 |
/* |
| 208 |
* If the LINK0 flag is set, it means the underlying interface |
219 |
* If the LINK0 flag is set, it means the underlying interface |
| 209 |
* can do VLAN tag insertion itself and doesn't require us to |
220 |
* can do VLAN tag insertion itself and doesn't require us to |
| 210 |
* create a special header for it. In this case, we just pass |
221 |
* create a special header for it. In this case, we just pass |
|
Lines 362-370
Link Here
|
| 362 |
ifv->ifv_if.if_mtu = p->if_data.ifi_mtu - EVL_ENCAPLEN; |
373 |
ifv->ifv_if.if_mtu = p->if_data.ifi_mtu - EVL_ENCAPLEN; |
| 363 |
|
374 |
|
| 364 |
/* |
375 |
/* |
| 365 |
* Preserve the state of the LINK0 flag for ourselves. |
376 |
* Copy only a selected subset of flags from the parent |
| 366 |
*/ |
377 |
*/ |
| 367 |
ifv->ifv_if.if_flags = (p->if_flags & ~(IFF_LINK0)); |
378 |
ifv->ifv_if.if_flags = (p->if_flags & |
|
|
379 |
(IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX | IFF_POINTOPOINT)); |
| 368 |
|
380 |
|
| 369 |
/* |
381 |
/* |
| 370 |
* Set up our ``Ethernet address'' to reflect the underlying |
382 |
* Set up our ``Ethernet address'' to reflect the underlying |
|
Lines 488-495
Link Here
|
| 488 |
break; |
500 |
break; |
| 489 |
if (vlr.vlr_parent[0] == '\0') { |
501 |
if (vlr.vlr_parent[0] == '\0') { |
| 490 |
vlan_unconfig(ifp); |
502 |
vlan_unconfig(ifp); |
| 491 |
if_down(ifp); |
503 |
if (ifp->if_flags & IFF_UP) { |
| 492 |
ifp->if_flags &= ~(IFF_UP|IFF_RUNNING); |
504 |
int s = splimp(); |
|
|
505 |
if_down(ifp); |
| 506 |
splx(s); |
| 507 |
} |
| 508 |
ifp->if_flags &= ~IFF_RUNNING; |
| 493 |
break; |
509 |
break; |
| 494 |
} |
510 |
} |
| 495 |
p = ifunit(vlr.vlr_parent); |
511 |
p = ifunit(vlr.vlr_parent); |