linux-stable/net/netlink
Eric Dumazet 6647b338fc netlink: fix netlink_diag_dump() return value
__netlink_diag_dump() returns 1 if the dump is not complete,
zero if no error occurred.

If err variable is zero, this means the dump is complete:
We should not return skb->len in this case, but 0.

This allows NLMSG_DONE to be appended to the skb.
User space does not have to call us again only to get NLMSG_DONE.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-02-26 11:46:12 +00:00
..
af_netlink.c netlink: fix potential sleeping issue in mqueue_flush_file 2024-01-23 11:21:18 +01:00
af_netlink.h netlink: convert nlk->flags to atomic flags 2023-08-13 12:23:19 +01:00
diag.c netlink: fix netlink_diag_dump() return value 2024-02-26 11:46:12 +00:00
genetlink.c genetlink: Add per family bind/unbind callbacks 2024-02-15 17:49:16 -08:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile netlink: add infrastructure to expose policies to userspace 2020-04-30 17:51:42 -07:00
policy.c netlink: add variable-length / auto integers 2023-10-20 11:43:35 +01:00