linux/Documentation/netlink
Asbjørn Sloth Tønnesen 09a45a5553 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: bc8aeb2045 ("Documentation: netlink: add a YAML spec for mptcp")
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Reviewed-by: Davide Caratti <dcaratti@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20240911091003.1112179-1-ast@fiberby.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-11 20:42:47 -07:00
..
specs netlink: specs: mptcp: fix port endianness 2024-09-11 20:42:47 -07:00
genetlink-c.yaml ynl: rename array-nest to indexed-array 2024-04-05 22:32:49 -07:00
genetlink-legacy.yaml ynl: rename array-nest to indexed-array 2024-04-05 22:32:49 -07:00
genetlink.yaml ynl: rename array-nest to indexed-array 2024-04-05 22:32:49 -07:00
netlink-raw.yaml ynl: rename array-nest to indexed-array 2024-04-05 22:32:49 -07:00