summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2016-08-25 15:27:51 +0300
committerDavid S. Miller <davem@davemloft.net>2016-08-26 21:45:28 +0300
commit72f4af4e4706a07727765bc6b7bdace4b1543543 (patch)
tree9da103351dca0ac48e06d2f1b2130e504356c0e1 /net/bridge
parentc80fafbbb59ef9924962f83aac85531039395b18 (diff)
downloadlinux-72f4af4e4706a07727765bc6b7bdace4b1543543.tar.xz
net: bridge: export also pvid flag in the xstats flags
When I added support to export the vlan entry flags via xstats I forgot to add support for the pvid since it is manually matched, so check if the entry matches the vlan_group's pvid and set the flag appropriately. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_netlink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 872d4c0deb59..190a5bc00f4a 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -1313,6 +1313,9 @@ static int br_fill_linkxstats(struct sk_buff *skb,
return -EMSGSIZE;
if (vg) {
+ u16 pvid;
+
+ pvid = br_get_pvid(vg);
list_for_each_entry(v, &vg->vlan_list, vlist) {
struct bridge_vlan_xstats vxi;
struct br_vlan_stats stats;
@@ -1322,6 +1325,8 @@ static int br_fill_linkxstats(struct sk_buff *skb,
memset(&vxi, 0, sizeof(vxi));
vxi.vid = v->vid;
vxi.flags = v->flags;
+ if (v->vid == pvid)
+ vxi.flags |= BRIDGE_VLAN_INFO_PVID;
br_vlan_get_stats(v, &stats);
vxi.rx_bytes = stats.rx_bytes;
vxi.rx_packets = stats.rx_packets;