diff options
author | Jianbo Liu <jianbol@mellanox.com> | 2018-07-06 07:38:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-07 13:51:53 +0200 |
commit | d30695126f0ac5bca85d09c7946ad9a1deab5d25 (patch) | |
tree | 57b8dd2cfe9b40678ce429eb9dcb41160acf8df9 /net/sched/cls_flower.c | |
parent | net/flow_dissector: Add support for QinQ dissection (diff) | |
download | linux-d30695126f0ac5bca85d09c7946ad9a1deab5d25.tar.xz linux-d30695126f0ac5bca85d09c7946ad9a1deab5d25.zip |
net/sched: flower: Dump the ethertype encapsulated in vlan
Currently the encapsulated ethertype is not dumped as it's the same as
TCA_FLOWER_KEY_ETH_TYPE keyvalue. But the dumping result is inconsistent
with input, we add dumping it with TCA_FLOWER_KEY_VLAN_ETH_TYPE.
Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_flower.c')
-rw-r--r-- | net/sched/cls_flower.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index da9ec30763fe..e93b13d2cb81 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -1313,6 +1313,10 @@ static int fl_dump(struct net *net, struct tcf_proto *tp, void *fh, if (fl_dump_key_vlan(skb, &key->vlan, &mask->vlan)) goto nla_put_failure; + if (mask->vlan.vlan_tpid && + nla_put_be16(skb, TCA_FLOWER_KEY_VLAN_ETH_TYPE, key->basic.n_proto)) + goto nla_put_failure; + if ((key->basic.n_proto == htons(ETH_P_IP) || key->basic.n_proto == htons(ETH_P_IPV6)) && (fl_dump_key_val(skb, &key->basic.ip_proto, TCA_FLOWER_KEY_IP_PROTO, |