Skip to content

Commit 09a45a5

Browse files
Asbjørn Sloth Tønnesenkuba-moo
authored andcommitted
netlink: specs: mptcp: fix port endianness
The MPTCP port attribute is in host endianness, but was documented as big-endian in the ynl specification. Below are two examples from net/mptcp/pm_netlink.c showing that the attribute is converted to/from host endianness for use with netlink. Import from netlink: addr->port = htons(nla_get_u16(tb[MPTCP_PM_ADDR_ATTR_PORT])) Export to netlink: nla_put_u16(skb, MPTCP_PM_ADDR_ATTR_PORT, ntohs(addr->port)) Where addr->port is defined as __be16. No functional change intended. Fixes: bc8aeb2 ("Documentation: netlink: add a YAML spec for mptcp") Signed-off-by: Asbjørn Sloth Tønnesen <[email protected]> Reviewed-by: Davide Caratti <[email protected]> Reviewed-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent cbd7ec0 commit 09a45a5

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Documentation/netlink/specs/mptcp_pm.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ attribute-sets:
109109
-
110110
name: port
111111
type: u16
112-
byte-order: big-endian
113112
-
114113
name: flags
115114
type: u32

0 commit comments

Comments
 (0)