Adding an endpoint with 'id 0' is not allowed. In this case, the kernel
will ignore this 'id 0' and set another one.
Similarly, because there are no endpoints with this 'id 0', changing an
attribute for such endpoint will not be possible.
To avoid some confusions, it sounds better to clearly report an error
that the ID cannot be 0 in these cases.
Acked-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
invarg("invalid for non-zero id address\n", "ADDRESS");
else if (!id && !addr_set)
invarg("address is needed for deleting id 0 address\n", "ID");
+ } else if (id_set && !deling && !id) {
+ invarg("cannot be 0\n", "ID");
}
if (adding && port && !(flags & MPTCP_PM_ADDR_FLAG_SIGNAL))