[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y9PVMrxPS8Wx7irE@shredder>
Date: Fri, 27 Jan 2023 15:44:18 +0200
From: Ido Schimmel <idosch@...sch.org>
To: Johannes Berg <johannes@...solutions.net>
Cc: netdev@...r.kernel.org, Johannes Berg <johannes.berg@...el.com>
Subject: Re: [PATCH net-next] net: netlink: recommend policy range validation
On Fri, Jan 27, 2023 at 08:45:06AM +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@...el.com>
>
> For large ranges (outside of s16) the documentation currently
> recommends open-coding the validation, but it's better to use
> the NLA_POLICY_FULL_RANGE() or NLA_POLICY_FULL_RANGE_SIGNED()
> policy validation instead; recommend that.
>
> Signed-off-by: Johannes Berg <johannes.berg@...el.com>
I followed the current comment in code I'm currently working on to
validate VXLAN VNI ([0, 16M - 1]). Adjusted to use
NLA_POLICY_FULL_RANGE() following your patch, so thanks for that.
Reviewed-by: Ido Schimmel <idosch@...dia.com>
Powered by blists - more mailing lists