Skip to content

Commit fdf9933

Browse files
authored
flags: define "implicit" (#329)
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 <saulius2@ar-fi.lt> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
1 parent 32524b7 commit fdf9933

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

include/mptcpd/types.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ typedef uint32_t mptcpd_flags_t;
7474
*/
7575
#define MPTCPD_ADDR_FLAG_FULLMESH (1U << 3)
7676

77+
/**
78+
* @brief Endpoint implicitly created by the kernel PM.
79+
*
80+
* It exists because no userspace ones correspond to the associated address
81+
* and port. It can only be set by the kernel.
82+
*
83+
* @note Do not set from the userspace to the kernelspace.
84+
*/
85+
#define MPTCPD_ADDR_FLAG_IMPLICIT (1U << 4)
86+
7787
/// Use this endpoint in reaction to ADD_ADDR, but only once.
7888
#define MPTCPD_ADDR_FLAG_LAMINAR (1U << 5)
7989
///@}

src/netlink_pm_upstream.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
|| MPTCPD_ADDR_FLAG_SUBFLOW != MPTCP_PM_ADDR_FLAG_SUBFLOW \
3636
|| MPTCPD_ADDR_FLAG_BACKUP != MPTCP_PM_ADDR_FLAG_BACKUP \
3737
|| MPTCPD_ADDR_FLAG_FULLMESH != MPTCP_PM_ADDR_FLAG_FULLMESH \
38+
|| MPTCPD_ADDR_FLAG_IMPLICIT != MPTCP_PM_ADDR_FLAG_IMPLICIT \
3839
|| MPTCPD_ADDR_FLAG_LAMINAR != MPTCP_PM_ADDR_FLAG_LAMINAR
3940
# error Mismatch between mptcpd and upstream kernel addr flags.
4041
#endif

0 commit comments

Comments
 (0)