Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115903287
D35846.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
631 B
Referenced Files
None
Subscribers
None
D35846.diff
View Options
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1538,8 +1538,24 @@
*/
if (vid == 0 || vid == 0xFFF || (vid & ~EVL_VLID_MASK))
return (EINVAL);
- if (ifv->ifv_trunk)
- return (EBUSY);
+ if (ifv->ifv_trunk) {
+ trunk = ifv->ifv_trunk;
+ if (trunk->parent != p)
+ return (EBUSY);
+
+ VLAN_XLOCK();
+
+ ifv->ifv_proto = proto;
+
+ if (ifv->ifv_vid != vid) {
+ /* Re-hash */
+ vlan_remhash(trunk, ifv);
+ ifv->ifv_vid = vid;
+ error = vlan_inshash(trunk, ifv);
+ }
+ /* Will unlock */
+ goto done;
+ }
VLAN_XLOCK();
if (p->if_vlantrunk == NULL) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 1, 5:33 AM (41 m, 9 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17873990
Default Alt Text
D35846.diff (631 B)
Attached To
Mode
D35846: if_vlan: allow vlan and vlanproto to be changed
Attached
Detach File
Event Timeline
Log In to Comment