On 04/10/2024 13:13, Daniel Borkmann wrote: > Jakub suggested to rely on netlink policy validation via NLA_POLICY_MAX() > instead of open-coding it. netkit_check_mode() is a candidate which can > be simplified through this as well aside from the netkit scrubbing one. > > Suggested-by: Jakub Kicinski <kuba@xxxxxxxxxx> > Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx> > Cc: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx> > --- > v1 -> v2: > - new patch, also use NLA_POLICY_MAX here (Jakub) > > drivers/net/netkit.c | 25 +++---------------------- > 1 file changed, 3 insertions(+), 22 deletions(-) > Nice :) Acked-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>