[PATCH 1/2] vlan: add VLAN flags to trans_tbl to print them properly
Jiří Klimeš
jklimes at redhat.com
Thu Sep 3 05:23:52 PDT 2015
nl-link-list only showed reorder_hdr.
$ ip -d link show dev em1.444
28: em1.444 at em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
link/ether 3c:97:0e:58:1d:c1 brd ff:ff:ff:ff:ff:ff promiscuity 0
vlan protocol 802.1Q id 444 <REORDER_HDR,GVRP,LOOSE_BINDING>
ingress-qos-map { 1:3 4:2 }
egress-qos-map { 2:6 9:5 }
$ /usr/sbin/nl-link-list --details -i 28
em1.444 ether 3c:97:0e:18:2e:a1 <broadcast,multicast,up,running,lowerup> slave-of em1 group 0 vlan-id 444
mtu 1500 txqlen 0 weight 0 qdisc noqueue index 28
txq 1 rxq 1 brd ff:ff:ff:ff:ff:ff state up mode default carrier up
vlan-info id 444 <reorder_hdr,> vlan protocol <129>
ingress vlan prio -> qos/socket prio mapping:
1 -> 0x000003, 4 -> 0x000002,
egress qos/socket prio -> vlan prio mapping:
0x000002 -> 6, 0x000009 -> 5,
...
Signed-off-by: Jiří Klimeš <jklimes at redhat.com>
---
lib/route/link/vlan.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/route/link/vlan.c b/lib/route/link/vlan.c
index 9dc0d42..d815f65 100644
--- a/lib/route/link/vlan.c
+++ b/lib/route/link/vlan.c
@@ -610,6 +610,8 @@ struct vlan_map *rtnl_link_vlan_get_egress_map(struct rtnl_link *link,
static const struct trans_tbl vlan_flags[] = {
__ADD(VLAN_FLAG_REORDER_HDR, reorder_hdr),
+ __ADD(VLAN_FLAG_GVRP, gvrp),
+ __ADD(VLAN_FLAG_LOOSE_BINDING, loose_binding),
};
/**
--
2.1.0
More information about the libnl
mailing list