From 9e0771c1f5f7a88799dc9566536864c1d8ead4fa Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Tue, 25 Nov 2025 19:14:39 +0100 Subject: [PATCH] flags: define "implicit" Mainly to add a comment about that: it cannot be set from the userspace, so it should not be used in path-managers. Suggested-by: Saulius Krasuckas Signed-off-by: Matthieu Baerts (NGI0) --- include/mptcpd/types.h | 10 ++++++++++ src/netlink_pm_upstream.c | 1 + 2 files changed, 11 insertions(+) diff --git a/include/mptcpd/types.h b/include/mptcpd/types.h index 56bba74d..0ed0348c 100644 --- a/include/mptcpd/types.h +++ b/include/mptcpd/types.h @@ -74,6 +74,16 @@ typedef uint32_t mptcpd_flags_t; */ #define MPTCPD_ADDR_FLAG_FULLMESH (1U << 3) +/** + * @brief Endpoint implicitly created by the kernel PM. + * + * It exists because no userspace ones correspond to the associated address + * and port. It can only be set by the kernel. + * + * @note Do not set from the userspace to the kernelspace. + */ +#define MPTCPD_ADDR_FLAG_IMPLICIT (1U << 4) + /// Use this endpoint in reaction to ADD_ADDR, but only once. #define MPTCPD_ADDR_FLAG_LAMINAR (1U << 5) ///@} diff --git a/src/netlink_pm_upstream.c b/src/netlink_pm_upstream.c index 541a7242..01bc062a 100644 --- a/src/netlink_pm_upstream.c +++ b/src/netlink_pm_upstream.c @@ -35,6 +35,7 @@ || MPTCPD_ADDR_FLAG_SUBFLOW != MPTCP_PM_ADDR_FLAG_SUBFLOW \ || MPTCPD_ADDR_FLAG_BACKUP != MPTCP_PM_ADDR_FLAG_BACKUP \ || MPTCPD_ADDR_FLAG_FULLMESH != MPTCP_PM_ADDR_FLAG_FULLMESH \ + || MPTCPD_ADDR_FLAG_IMPLICIT != MPTCP_PM_ADDR_FLAG_IMPLICIT \ || MPTCPD_ADDR_FLAG_LAMINAR != MPTCP_PM_ADDR_FLAG_LAMINAR # error Mismatch between mptcpd and upstream kernel addr flags. #endif