diff mbox series

[net,08/16] openvswitch: add missing attribute validation for hash

Message ID 20200303050526.4088735-9-kuba@kernel.org
State Accepted
Delegated to: David Miller
Headers show
Series net: add missing netlink policies | expand

Commit Message

Jakub Kicinski March 3, 2020, 5:05 a.m. UTC
Add missing attribute validation for OVS_PACKET_ATTR_HASH
to the netlink policy.

Fixes: bd1903b7c459 ("net: openvswitch: add hash info to upcall")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: Pravin B Shelar <pshelar@ovn.org>
CC: Tonghao Zhang <xiangxia.m.yue@gmail.com>
CC: dev@openvswitch.org
---
 net/openvswitch/datapath.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Gregory Rose March 3, 2020, 9:24 p.m. UTC | #1
On 3/2/2020 9:05 PM, Jakub Kicinski wrote:
> Add missing attribute validation for OVS_PACKET_ATTR_HASH
> to the netlink policy.
>
> Fixes: bd1903b7c459 ("net: openvswitch: add hash info to upcall")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: Pravin B Shelar <pshelar@ovn.org>
> CC: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> CC: dev@openvswitch.org
> ---
>   net/openvswitch/datapath.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
> index c047afd12116..07a7dd185995 100644
> --- a/net/openvswitch/datapath.c
> +++ b/net/openvswitch/datapath.c
> @@ -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[] = {

LGTM

Reviewed-by: Greg Rose <gvrose8192@gmail.com>
diff mbox series

Patch

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index c047afd12116..07a7dd185995 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -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[] = {