FreeBSD Bugzilla – Attachment 11223 Details for
Bug 22179
VLAN driver fails to hanlde interface flags properly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.35 KB, created by
Yar Tikhiy
on 2000-10-21 13:10:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Yar Tikhiy
Created:
2000-10-21 13:10:01 UTC
Size:
1.35 KB
patch
obsolete
>--- if_vlan.c.orig Sat Oct 21 14:13:01 2000 >+++ if_vlan.c Sat Oct 21 15:53:10 2000 >@@ -205,6 +205,17 @@ > bpf_mtap(ifp, m); > > /* >+ * Do not run parent's if_start() if it's not up, >+ * or parent's driver will cause a system crash >+ */ >+ if ((p->if_flags & (IFF_UP | IFF_RUNNING)) != >+ (IFF_UP | IFF_RUNNING)) { >+ m_freem(m); >+ ifp->if_data.ifi_collisions++; >+ continue; >+ } >+ >+ /* > * If the LINK0 flag is set, it means the underlying interface > * can do VLAN tag insertion itself and doesn't require us to > * create a special header for it. In this case, we just pass >@@ -362,9 +373,10 @@ > ifv->ifv_if.if_mtu = p->if_data.ifi_mtu - EVL_ENCAPLEN; > > /* >- * Preserve the state of the LINK0 flag for ourselves. >+ * Copy only a selected subset of flags from the parent > */ >- ifv->ifv_if.if_flags = (p->if_flags & ~(IFF_LINK0)); >+ ifv->ifv_if.if_flags = (p->if_flags & >+ (IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX | IFF_POINTOPOINT)); > > /* > * Set up our ``Ethernet address'' to reflect the underlying >@@ -488,8 +500,12 @@ > break; > if (vlr.vlr_parent[0] == '\0') { > vlan_unconfig(ifp); >- if_down(ifp); >- ifp->if_flags &= ~(IFF_UP|IFF_RUNNING); >+ if (ifp->if_flags & IFF_UP) { >+ int s = splimp(); >+ if_down(ifp); >+ splx(s); >+ } >+ ifp->if_flags &= ~IFF_RUNNING; > break; > } > p = ifunit(vlr.vlr_parent);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22179
: 11223