]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virarptable: Fix check for message length
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 16 Aug 2024 11:59:15 +0000 (13:59 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 19 Aug 2024 10:14:26 +0000 (12:14 +0200)
commitef84581a69cb76932dec6957f86c2429d0baf39d
treeb0c6f5a3f5dede5e7a2f07684be2a98ed8868ca4
parente7530769e879199fc6003a8a44da3a441d40c461
virarptable: Fix check for message length

The previous check was all wrong since it calculated the how long would
the netlink message be if the netlink header was the payload and then
subtracted that from the whole message length, a variable that was not
used later in the code.  This check can fail if there are no additional
payloads, struct rtattr in particular, which we are parsing later,
however the RTA_OK macro would've caught that anyway.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/util/virarptable.c