svn commit: r279071 - head/sys/net
Xin LI
delphij at FreeBSD.org
Fri Feb 20 18:39:13 UTC 2015
Author: delphij
Date: Fri Feb 20 18:39:12 2015
New Revision: 279071
URL: https://svnweb.freebsd.org/changeset/base/279071
Log:
Handle SIOCSIFCAP by propogating the request to the parent interface. This
allows adding an vlan interface into a bridge.
Thanks for William Katsak <wkatsak cs rutgers edu> for testing and fixing
an issue in my previous patch draft.
MFC after: 2 weeks
Modified:
head/sys/net/if_vlan.c
Modified: head/sys/net/if_vlan.c
==============================================================================
--- head/sys/net/if_vlan.c Fri Feb 20 18:06:33 2015 (r279070)
+++ head/sys/net/if_vlan.c Fri Feb 20 18:39:12 2015 (r279071)
@@ -1775,6 +1775,27 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd
}
break;
+ case SIOCSIFCAP:
+ VLAN_LOCK();
+ if (TRUNK(ifv) != NULL) {
+ p = PARENT(ifv);
+ VLAN_UNLOCK();
+ if ((p->if_type != IFT_ETHER) &&
+ (ifr->ifr_reqcap & IFCAP_VLAN_HWTAGGING) == 0) {
+ error = EINVAL;
+ break;
+ }
+ error = (*p->if_ioctl)(p, cmd, data);
+ if (error)
+ break;
+ /* Propogate vlan interface capabilities */
+ vlan_trunk_capabilities(p);
+ } else {
+ VLAN_UNLOCK();
+ error = EINVAL;
+ }
+ break;
+
default:
error = EINVAL;
break;
More information about the svn-src-head
mailing list