[PATCH mptcp-net 2/6] mptcp: pm: userspace: allow announcing ID0 addr
"Matthieu Baerts (NGI0)" <[email protected]> Mon, 27 Jul 2026 19:21:51 +0200
| Newsgroups | dev.linux.lists.mptcp |
|---|---|
| Message-ID | <20260727-mptcp-pm-userspace-id0-case-v1-2-9877f02a9bae@kernel.org> |
It is valid to announce an address with the ID0, the in-kernel PM allows
to do that when re-announcing the initial IP address after having been
deleted.
So no need to have such exception. If the ID is set to 0, but the
address doesn't match with the existing one, an error will be returned
by mptcp_userspace_pm_append_new_local_addr().
Fixes: 9ab4807c84a4 ("mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE")
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
---
net/mptcp/pm_userspace.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index 6e6eeda91ade..4c96433590e3 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -212,12 +212,6 @@ int mptcp_pm_nl_announce_doit(struct sk_buff *skb, struct genl_info *info)
if (err < 0)
goto announce_err;
- if (addr_val.addr.id == 0) {
- NL_SET_ERR_MSG_ATTR(info->extack, addr, "invalid addr id");
- err = -EINVAL;
- goto announce_err;
- }
-
if (!(addr_val.flags & MPTCP_PM_ADDR_FLAG_SIGNAL)) {
NL_SET_ERR_MSG_ATTR(info->extack, addr, "invalid addr flags");
err = -EINVAL;
--
2.53.0