Re: [PATCH net-next v3 05/15] mptcp: pm: userspace: use GENL_REQ_ATTR_CHECK
From: Simon Horman
Date: Mon Feb 10 2025 - 14:51:34 EST
On Fri, Feb 07, 2025 at 02:59:23PM +0100, Matthieu Baerts (NGI0) wrote:
> From: Geliang Tang <tanggeliang@xxxxxxxxxx>
>
> A more general way to check if MPTCP_PM_ATTR_* exists in 'info'
> is to use GENL_REQ_ATTR_CHECK(info, MPTCP_PM_ATTR_*) instead of
> directly reading info->attrs[MPTCP_PM_ATTR_*] and then checking
> if it's NULL.
>
> So this patch uses GENL_REQ_ATTR_CHECK() for userspace PM in
> mptcp_pm_nl_announce_doit(), mptcp_pm_nl_remove_doit(),
> mptcp_pm_nl_subflow_create_doit(), mptcp_pm_nl_subflow_destroy_doit()
> and mptcp_userspace_pm_get_sock().
>
> Suggested-by: Jakub Kicinski <kuba@xxxxxxxxxx>
> Signed-off-by: Geliang Tang <tanggeliang@xxxxxxxxxx>
> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>