mptcp: deal with MPTCP_PM_ADDR_ATTR_PORT in PM netlink
This patch adds MPTCP_PM_ADDR_ATTR_PORT filling and parsing in PM netlink. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
60b57bf76c
commit
a77e9179c7
|
@ -911,6 +911,9 @@ skip_family:
|
|||
if (tb[MPTCP_PM_ADDR_ATTR_FLAGS])
|
||||
entry->addr.flags = nla_get_u32(tb[MPTCP_PM_ADDR_ATTR_FLAGS]);
|
||||
|
||||
if (tb[MPTCP_PM_ADDR_ATTR_PORT])
|
||||
entry->addr.port = htons(nla_get_u16(tb[MPTCP_PM_ADDR_ATTR_PORT]));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1177,6 +1180,8 @@ static int mptcp_nl_fill_addr(struct sk_buff *skb,
|
|||
|
||||
if (nla_put_u16(skb, MPTCP_PM_ADDR_ATTR_FAMILY, addr->family))
|
||||
goto nla_put_failure;
|
||||
if (nla_put_u16(skb, MPTCP_PM_ADDR_ATTR_PORT, ntohs(addr->port)))
|
||||
goto nla_put_failure;
|
||||
if (nla_put_u8(skb, MPTCP_PM_ADDR_ATTR_ID, addr->id))
|
||||
goto nla_put_failure;
|
||||
if (nla_put_u32(skb, MPTCP_PM_ADDR_ATTR_FLAGS, entry->addr.flags))
|
||||
|
|
Loading…
Reference in New Issue