]> www.infradead.org Git - users/hch/misc.git/commit
mptcp: pm: mark missing address attributes
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Fri, 7 Feb 2025 13:59:25 +0000 (14:59 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 11 Feb 2025 11:46:37 +0000 (12:46 +0100)
commit8cdc56f99e6c33abc855891dbd4d802be06d1404
treed5d572a299753de4f32adc6a68c78c9077d27837
parent60097f03fc7a96fecb4ea9a993397032fe586778
mptcp: pm: mark missing address attributes

mptcp_pm_parse_entry() will check if the given attribute is defined. If
not, it will return a generic error: "missing address info".

It might then not be clear for the userspace developer which attribute
is missing, especially when the command takes multiple addresses.

By using GENL_REQ_ATTR_CHECK(), the userspace will get a hint about
which attribute is missing, making thing clearer. Note that this is what
was already done for most of the other MPTCP NL commands, this patch
simply adds the missing ones.

Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/mptcp/pm_netlink.c
net/mptcp/pm_userspace.c