pyroute2
pyroute2 copied to clipboard
Add MPTCP Support
Hello,
Recently MPTCP configuration was added to iproute2.
https://man7.org/linux/man-pages/man8/ip-mptcp.8.html
It would be useful to have this in pyroute2.
Please let me know if there is anything I can do to help with this.
Thanks for heads-up!
@pgagne basic endpoint management has been added: https://github.com/svinota/pyroute2/commit/db1c48e7089419d64f307e4db0e4387a6966a9a6
Limits support and flags will be done this weekend.
Limits support has been added: https://github.com/svinota/pyroute2/commit/4e194b99f0ff016d75a8eefd29f81d4d0c0a7c13
Corresponding tests are to be added asap.
@pgagne I believe the mptcp support is more or less tolerable. Please let me know if you miss something.
Thanks @svinota I'll take a look and let you know.
@svinota is there support to set the endpoint flags when adding the endpoint (ie signal, subflow, backup
), the equivalent of
ip mptcp endpoint add <addr> subflow
I think i figure out how to set the endpoint flags,
class MPTCPFlags(IntFlag):
# via https://github.com/torvalds/linux/blob/9d31d2338950293ec19d9b095fbaa9030899dcb4/include/uapi/linux/mptcp.h#L73
MPTCP_PM_ADDR_FLAG_SIGNAL = (1 << 0)
MPTCP_PM_ADDR_FLAG_SUBFLOW = (1 << 1)
MPTCP_PM_ADDR_FLAG_BACKUP = (1 << 2)
mptcp.endpoint("add", addr=str(ip), flags=MPTCPFlags.MPTCP_PM_ADDR_FLAG_SUBFLOW)
this will work for me for now.
Hi, is there a way to do an equivalent of ip mptcp add ADDRESS dev NAME
?