diff options
author | David Ahern <dsahern@gmail.com> | 2017-05-15 23:19:17 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-16 14:54:11 -0400 |
commit | f6c5775ff0bfa62b072face6bf1d40f659f194b2 (patch) | |
tree | 81509058479d9044f36229fafd3c1a603f101204 /net/phonet/af_phonet.c | |
parent | 19a0f7e37c0761a0a1cbf550705a6063c9675223 (diff) |
net: Improve handling of failures on link and route dumps
In general, rtnetlink dumps do not anticipate failure to dump a single
object (e.g., link or route) on a single pass. As both route and link
objects have grown via more attributes, that is no longer a given.
netlink dumps can handle a failure if the dump function returns an
error; specifically, netlink_dump adds the return code to the response
if it is <= 0 so userspace is notified of the failure. The missing
piece is the rtnetlink dump functions returning the error.
Fix route and link dump functions to return the errors if no object is
added to an skb (detected by skb->len != 0). IPv6 route dumps
(rt6_dump_route) already return the error; this patch updates IPv4 and
link dumps. Other dump functions may need to be ajusted as well.
Reported-by: Jan Moskyto Matejka <mq@ucw.cz>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet/af_phonet.c')
0 files changed, 0 insertions, 0 deletions