summaryrefslogtreecommitdiffstats
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2015-02-20 18:39:12 +0000
committerdelphij <delphij@FreeBSD.org>2015-02-20 18:39:12 +0000
commite422dfb4e081c835d25375f9418364c467041b17 (patch)
tree4ae7388a56904a663fd9a15a287b4a6ebcb08666 /sys/net/if_vlan.c
parent989552348a75e7767f8c56f644965de684b10eb6 (diff)
downloadFreeBSD-src-e422dfb4e081c835d25375f9418364c467041b17.zip
FreeBSD-src-e422dfb4e081c835d25375f9418364c467041b17.tar.gz
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
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 1be2888..54c4833 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1775,6 +1775,27 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
}
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;
OpenPOWER on IntegriCloud