]> git.baikalelectronics.ru Git - kernel.git/commitdiff
openvswitch: add missing attribute validation for hash
authorJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2020 05:05:18 +0000 (21:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Mar 2020 21:28:48 +0000 (13:28 -0800)
Add missing attribute validation for OVS_PACKET_ATTR_HASH
to the netlink policy.

Fixes: 726d124c69ce ("net: openvswitch: add hash info to upcall")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/datapath.c

index c047afd121160f4fd66d4fcd135eb15dd2dbc6e7..07a7dd185995454b86f441cca819772cce9bcef0 100644 (file)
@@ -645,6 +645,7 @@ static const struct nla_policy packet_policy[OVS_PACKET_ATTR_MAX + 1] = {
        [OVS_PACKET_ATTR_ACTIONS] = { .type = NLA_NESTED },
        [OVS_PACKET_ATTR_PROBE] = { .type = NLA_FLAG },
        [OVS_PACKET_ATTR_MRU] = { .type = NLA_U16 },
+       [OVS_PACKET_ATTR_HASH] = { .type = NLA_U64 },
 };
 
 static const struct genl_ops dp_packet_genl_ops[] = {