[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e3405821-a614-2e04-c319-b54b9a1a0901@blackwall.org>
Date: Mon, 18 Sep 2023 21:40:29 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: Benjamin Poirier <bpoirier@...dia.com>, netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Ido Schimmel <idosch@...dia.com>,
Simon Horman <horms@...nel.org>, Jiri Benc <jbenc@...hat.com>,
Gavin Li <gavinl@...dia.com>, Hangbin Liu <liuhangbin@...il.com>,
Vladimir Nikishkin <vladimir@...ishkin.pw>, Li Zetao <lizetao1@...wei.com>,
Thomas Graf <tgraf@...g.ch>, Tom Herbert <therbert@...gle.com>,
Roopa Prabhu <roopa@...dia.com>
Subject: Re: [PATCH net] vxlan: Add missing entries to vxlan_get_size()
On 9/18/23 18:40, Benjamin Poirier wrote:
> There are some attributes added by vxlan_fill_info() which are not
> accounted for in vxlan_get_size(). Add them.
>
> I didn't find a way to trigger an actual problem from this miscalculation
> since there is usually extra space in netlink size calculations like
> if_nlmsg_size(); but maybe I just didn't search long enough.
>
> Fixes: 3511494ce2f3 ("vxlan: Group Policy extension")
> Fixes: e1e5314de08b ("vxlan: implement GPE")
> Fixes: 0ace2ca89cbd ("vxlan: Use checksum partial with remote checksum offload")
> Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
> Signed-off-by: Benjamin Poirier <bpoirier@...dia.com>
> ---
> drivers/net/vxlan/vxlan_core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
> index e463f59e95c2..5b5597073b00 100644
> --- a/drivers/net/vxlan/vxlan_core.c
> +++ b/drivers/net/vxlan/vxlan_core.c
> @@ -4331,6 +4331,10 @@ static size_t vxlan_get_size(const struct net_device *dev)
> nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_REMCSUM_TX */
> nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_REMCSUM_RX */
> nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_LOCALBYPASS */
> + nla_total_size(0) + /* IFLA_VXLAN_GBP */
> + nla_total_size(0) + /* IFLA_VXLAN_GPE */
> + nla_total_size(0) + /* IFLA_VXLAN_REMCSUM_NOPARTIAL */
> + nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_VNIFILTER */
> 0;
> }
>
Acked-by: Nikolay Aleksandrov <razor@...ckwall.org>
Powered by blists - more mailing lists