This patch added a new command MPTCP_PM_CMD_SET_FLAGS in PM netlink: In mptcp_nl_cmd_set_flags, parse the input address, get the backup value according to whether the address's FLAG_BACKUP flag is set from the user-space. Then check whether this address had been added in the local address list. If it had been, then call mptcp_nl_addr_backup to deal with this address. In mptcp_nl_addr_backup, traverse all the existing msk sockets to find the relevant sockets, and call mptcp_pm_nl_mp_prio_send_ack to send out a MP_PRIO ACK packet. Finally in mptcp_nl_cmd_set_flags, set or clear the address's FLAG_BACKUP flag.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -82,6 +82,7 @@ enum { · 81 unmodified lines | ||
| 82 | 82 | MPTCP_PM_CMD_FLUSH_ADDRS, |
| 83 | 83 | MPTCP_PM_CMD_SET_LIMITS, |
| 84 | 84 | MPTCP_PM_CMD_GET_LIMITS, |
| 85 | + MPTCP_PM_CMD_SET_FLAGS, | |
| 85 | 86 | |
| 86 | 87 | __MPTCP_PM_CMD_AFTER_LAST |
| 87 | 88 | }; |