mptcpd
mptcpd copied to clipboard
Address ID passed to pm netlink add_addr command is overridden
NOTE: This issue is meant to document an address ID tracking conflict between the user-space (mptcpd) and the kernel. It is not necessarily an issue that needs to be corrected in mptcpd, at least at this point in time.
Describe the bug
The address ID passed to the mptcpd_pm_add_addr()
function is overridden by the kernel. Finding out what the actual address ID associated with the added local address is can only be done by iterating through the list of addresses obtained through the dump_addr
PM netlink command, This makes keeping track of address IDs in the user-space difficult.
To Reproduce Steps to reproduce the behavior:
- On a kernel with no addresses advertised through ADD_ADDR, e.g. a freshly booted kernel, call
mptcpd_pm_addr()
with an address ID other than1
. - Call
mptcpd_pm_get_addr()
with the same address ID used in the first step. - The
get_addr
call will fail with an "address not found" error returned from the kernel since the address ID passed to the kernel in step 1 is overridden.
Expected behavior
Ideally the kernel should not override user IDs managed by the user space, e.g. mptcpd. Otherwise it becomes difficult for the user-space to trigger a MPTCP REMOVE_ADDR
since the required address ID is unknown due to the kernel override.
Desktop (please complete the following information):
- Linux Kernel: 5.9.10
- Compiler: 10.2.1
Additional context See "Address ID assignment in netlink PM" on the old MPTCP community mailing list or the same thread on the current mailing list.
The corresponding kernel side issue is multipath-tcp/mptcp_net-next#117.