Re: [PATCH net-next 9/9] net: fib_rules: Use nlmsg_payload in fib_valid_dumprule_req

From: Breno Leitao
Date: Mon Apr 14 2025 - 08:03:26 EST


On Fri, Apr 11, 2025 at 02:38:01PM -0700, Kuniyuki Iwashima wrote:
> From: Breno Leitao <leitao@xxxxxxxxxx>
> Date: Fri, 11 Apr 2025 10:00:56 -0700
> > Leverage the new nlmsg_payload() helper to avoid checking for message
> > size and then reading the nlmsg data.
> >
> > Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
>
> Reviewed-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
>
> You can use it for fib_newrule() and fib_delrule() where
> nlmsg_data() is prefetched.

Agree. the code becomes way more readable, and more looks like more
"net" code.

Thanks for the suggestion, I am adding an additional patch for this one.

--breno