aboutgitcodebugslistschat
path: root/passt.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-08-03 17:19:54 +1000
committerStefano Brivio <sbrivio@redhat.com>2023-08-04 01:30:37 +0200
commit4d6e9d0816e2b28da1ed87b2d3d6bac40433dde4 (patch)
tree0fabe6f011d1851de5a7db9f70739a9834866d24 /passt.h
parent8de9805224046bfb601b6c59b1b482fd08f3ce24 (diff)
downloadpasst-4d6e9d0816e2b28da1ed87b2d3d6bac40433dde4.tar
passt-4d6e9d0816e2b28da1ed87b2d3d6bac40433dde4.tar.gz
passt-4d6e9d0816e2b28da1ed87b2d3d6bac40433dde4.tar.bz2
passt-4d6e9d0816e2b28da1ed87b2d3d6bac40433dde4.tar.lz
passt-4d6e9d0816e2b28da1ed87b2d3d6bac40433dde4.tar.xz
passt-4d6e9d0816e2b28da1ed87b2d3d6bac40433dde4.tar.zst
passt-4d6e9d0816e2b28da1ed87b2d3d6bac40433dde4.zip
netlink: Always process all responses to a netlink request
A single netlink request can result in multiple response datagrams. We process multiple response datagrams in some circumstances, but there are cases where we exit early and will leave remaining datagrams in the queue. These will be flushed in nl_send() before we send another request. This is confusing, and not what we need to reliably check for errors from netlink operations. So, instead, make sure we always process all the response datagrams whenever we send a request (excepting fatal errors). In most cases this is just a matter of avoiding early exits from nl_foreach loops. nl_route_dup() is a bit trickier, because we need to retain all the routes we're going to try to copy in a single buffer. Here we instead use a secondary buffer to flush any remaining datagrams, and report an error if there are any additional routes in those datagrams . Link: https://bugs.passt.top/show_bug.cgi?id=67 Link: https://bugs.passt.top/show_bug.cgi?id=60 Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'passt.h')
0 files changed, 0 insertions, 0 deletions