-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optional values for MPTCP_CMD_SUB_CREATE in netlink_pm_mptcp_org.c #134
Comments
The optional attribute comments and handling in netlink_pm_mptcp_org.c were based on the API documentation in <linux/mptcp.h>. There it states that only the MPTCP connection token, address family, local address ID and remote address ID are required. All other attributes are marked as optional (placed between square brackets). However, the implementation you pointed to does appear to indicate that the source and destination address, and destination port are required. @matttbe: Are the attributes in question actually required in the multipath-tcp.org kernel? Did I misunderstand the API docs? |
Thanks for bringing this up. It's a long standing piece of code that really should be corrected. Mptcpd doesn't explicitly require plugin authors to pass in a separate address family argument since it is readily available in the |
Sorry. I inadvertently closed this issue. Reopened. |
Good catch!
@ossama-othman indeed the "doc" is not OK in mptcp.h: https://github.com/multipath-tcp/mptcp/blob/mptcp_v0.95/include/uapi/linux/mptcp.h#L90 * - MPTCP_CMD_SUB_CREATE: token, family, loc_id, rem_id, [saddr4 | saddr6,
* daddr4 | daddr6, dport [, sport, backup, if_idx]]
* Create a new subflow. We need the token, family, loc_id and rem_id but also the destination address and port, which makes sense when you want to create a new subflow :) So it should be: * - MPTCP_CMD_SUB_CREATE: token, family, loc_id, rem_id, daddr4 | daddr6,
* dport[, saddr4 | saddr6 sport, backup, if_idx]
* Create a new subflow. I can fix that if nobody already has a patch. |
The remote address and port are required when creating a subflow. Update the mptcpd_pm_add_subflow() implementation accordingly. Fixes #134.
To create a subflow, like for a TCP connection, we always need a destination address and port. We need to reflect what is done in mptcp_netlink.c: if daddr4 or daddr6 is not set, the creation fails with -EINVAL. Closes: multipath-tcp/mptcpd#134 Fixes: 4ea5dee ("mptcp: new netlink-based path manager") Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
To create a subflow, like for a TCP connection, we always need a destination address and port. We need to reflect what is done in mptcp_netlink.c: if daddr4 or daddr6 is not set, the creation fails with -EINVAL. Closes: multipath-tcp/mptcpd#134 Fixes: 4ea5dee ("mptcp: new netlink-based path manager") Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> (cherry picked from commit 1260f8d) Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
To create a subflow, like for a TCP connection, we always need a destination address and port. We need to reflect what is done in mptcp_netlink.c: if daddr4 or daddr6 is not set, the creation fails with -EINVAL. Closes: multipath-tcp/mptcpd#134 Fixes: 4ea5dee ("mptcp: new netlink-based path manager") Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> (cherry picked from commit 1260f8d1a751bd04d657f132469d9448fba22eb1) Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Diaz1401 <reagor8161@outlook.com>
To create a subflow, like for a TCP connection, we always need a destination address and port. We need to reflect what is done in mptcp_netlink.c: if daddr4 or daddr6 is not set, the creation fails with -EINVAL. Closes: multipath-tcp/mptcpd#134 Fixes: 4ea5dee ("mptcp: new netlink-based path manager") Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> (cherry picked from commit 1260f8d1a751bd04d657f132469d9448fba22eb1) Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Diaz1401 <reagor8161@outlook.com>
Hi,
It looks like the comment https://github.com/intel/mptcpd/blob/master/src/netlink_pm_mptcp_org.c#L317-L321 are not correct. Local address, remote address and remote port are not optional for
MPTCP_CMD_SUB_CREATE
command. Only source port, backup flag and if_idx are optional. Please check the out of tree mptcp Netlink path manager implementation at kernel side https://github.com/multipath-tcp/mptcp/blob/mptcp_v0.95/net/mptcp/mptcp_netlink.c#L862-L872Also, why we are not adding
MPTCP_ATTR_FAMILY
for subflow create command? I see the bug comment https://github.com/intel/mptcpd/blob/v0.7/src/netlink_pm_mptcp_org.c#L333 but I don't understand it.Am I missing something here?
The text was updated successfully, but these errors were encountered: