mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
selftests: mptcp: add userspace pm subflow flag
This patch adds the address flag MPTCP_PM_ADDR_FLAG_SUBFLOW in csf() in pm_nl_ctl.c when subflow is created by a userspace PM. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c19ee3c7e3
commit
9963b77e25
|
|
@ -453,6 +453,7 @@ int csf(int fd, int pm_family, int argc, char *argv[])
|
|||
char data[NLMSG_ALIGN(sizeof(struct nlmsghdr)) +
|
||||
NLMSG_ALIGN(sizeof(struct genlmsghdr)) +
|
||||
1024];
|
||||
u_int32_t flags = MPTCP_PM_ADDR_FLAG_SUBFLOW;
|
||||
const char *params[5];
|
||||
struct nlmsghdr *nh;
|
||||
struct rtattr *addr;
|
||||
|
|
@ -558,6 +559,13 @@ int csf(int fd, int pm_family, int argc, char *argv[])
|
|||
off += NLMSG_ALIGN(rta->rta_len);
|
||||
}
|
||||
|
||||
/* addr flags */
|
||||
rta = (void *)(data + off);
|
||||
rta->rta_type = MPTCP_PM_ADDR_ATTR_FLAGS;
|
||||
rta->rta_len = RTA_LENGTH(4);
|
||||
memcpy(RTA_DATA(rta), &flags, 4);
|
||||
off += NLMSG_ALIGN(rta->rta_len);
|
||||
|
||||
addr->rta_len = off - addr_start;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user