WSL2-Linux-Kernel/net/phonet
Eric Dumazet 4ff334cade phonet: fix rtm_phonet_notify() skb allocation
[ Upstream commit d8cac8568618dcb8a51af3db1103e8d4cc4aeea7 ]

fill_route() stores three components in the skb:

- struct rtmsg
- RTA_DST (u8)
- RTA_OIF (u32)

Therefore, rtm_phonet_notify() should use

NLMSG_ALIGN(sizeof(struct rtmsg)) +
nla_total_size(1) +
nla_total_size(4)

Fixes: f062f41d06 ("Phonet: routing table Netlink interface")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Rémi Denis-Courmont <courmisch@gmail.com>
Link: https://lore.kernel.org/r/20240502161700.1804476-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-17 11:50:58 +02:00
..
Kconfig
Makefile
af_phonet.c net: Remove redundant if statements 2021-08-05 13:27:50 +01:00
datagram.c
pep-gprs.c
pep.c phonet: refcount leak in pep_sock_accep 2022-01-11 15:35:16 +01:00
pn_dev.c net: Remove redundant if statements 2021-08-05 13:27:50 +01:00
pn_netlink.c phonet: fix rtm_phonet_notify() skb allocation 2024-05-17 11:50:58 +02:00
socket.c net: Remove redundant if statements 2021-08-05 13:27:50 +01:00
sysctl.c