netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: geneve: add missing netlink policy and size for IFLA_GENEVE_INNER_PROTO_INHERIT
@ 2022-03-19  9:34 Eyal Birger
  2022-03-22  0:19 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Eyal Birger @ 2022-03-19  9:34 UTC (permalink / raw)
  To: davem, kuba, pabeni; +Cc: netdev, Eyal Birger

Add missing netlink attribute policy and size calculation.

Fixes: 435fe1c0c1f7 ("net: geneve: support IPv4/IPv6 as inner protocol")
Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
---
 drivers/net/geneve.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 8f30660224c5..d5af2ba3d32c 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1275,6 +1275,7 @@ static const struct nla_policy geneve_policy[IFLA_GENEVE_MAX + 1] = {
 	[IFLA_GENEVE_UDP_ZERO_CSUM6_RX]	= { .type = NLA_U8 },
 	[IFLA_GENEVE_TTL_INHERIT]	= { .type = NLA_U8 },
 	[IFLA_GENEVE_DF]		= { .type = NLA_U8 },
+	[IFLA_GENEVE_INNER_PROTO_INHERIT]	= { .type = NLA_FLAG },
 };
 
 static int geneve_validate(struct nlattr *tb[], struct nlattr *data[],
@@ -1780,6 +1781,7 @@ static size_t geneve_get_size(const struct net_device *dev)
 		nla_total_size(sizeof(__u8)) + /* IFLA_GENEVE_UDP_ZERO_CSUM6_TX */
 		nla_total_size(sizeof(__u8)) + /* IFLA_GENEVE_UDP_ZERO_CSUM6_RX */
 		nla_total_size(sizeof(__u8)) + /* IFLA_GENEVE_TTL_INHERIT */
+		nla_total_size(0) +	 /* IFLA_GENEVE_INNER_PROTO_INHERIT */
 		0;
 }
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: geneve: add missing netlink policy and size for IFLA_GENEVE_INNER_PROTO_INHERIT
  2022-03-19  9:34 [PATCH net-next] net: geneve: add missing netlink policy and size for IFLA_GENEVE_INNER_PROTO_INHERIT Eyal Birger
@ 2022-03-22  0:19 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2022-03-22  0:19 UTC (permalink / raw)
  To: Eyal Birger; +Cc: davem, pabeni, netdev

On Sat, 19 Mar 2022 11:34:54 +0200 Eyal Birger wrote:
> Add missing netlink attribute policy and size calculation.
> 
> Fixes: 435fe1c0c1f7 ("net: geneve: support IPv4/IPv6 as inner protocol")
> Signed-off-by: Eyal Birger <eyal.birger@gmail.com>

You should also set .strict_start_type on the policy to
IFLA_GENEVE_INNER_PROTO_INHERIT while at it.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-22  0:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-19  9:34 [PATCH net-next] net: geneve: add missing netlink policy and size for IFLA_GENEVE_INNER_PROTO_INHERIT Eyal Birger
2022-03-22  0:19 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).