]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
neighbour: fix neigh_dump_info() return value
authorEric Dumazet <edumazet@google.com>
Thu, 18 Apr 2024 09:51:05 +0000 (09:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2024 11:39:20 +0000 (12:39 +0100)
commit7e4975f7e7fb0eba3cbb69d9c467750a1c3ce131
treeb90e427ece807db017417b4fbc08774949e74eca
parentf8f2eb9de69a1119117d198547c13d7a1123a5a9
neighbour: fix neigh_dump_info() return value

Change neigh_dump_table() and pneigh_dump_table()
to either return 0 or -EMSGSIZE if not enough
space was available in the skb.

Then neigh_dump_info() can do the same.

This allows NLMSG_DONE to be appended to the current
skb at the end of a dump, saving a couple of recvmsg()
system calls.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/neighbour.c