]> xenbits.xensource.com Git - libvirt.git/commit
virarptable: End parsing earlier in case of NLMSG_DONE
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 16 Aug 2024 12:02:48 +0000 (14:02 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 19 Aug 2024 10:16:14 +0000 (12:16 +0200)
commit4de8962a79c1ddedc93e88f0104b5bd228fbbb71
tree32c2fd8ed17e1de016f13772d0f3470a09c8d362
parentef84581a69cb76932dec6957f86c2429d0baf39d
virarptable: End parsing earlier in case of NLMSG_DONE

Check for the last multipart message right as the first thing.  The
presumption probably was that the last message might still contain a
payload we want to parse.  However that cannot be true since that would
have to be a type RTM_NEWNEIGH.  This was not caught because older
kernels were note sending NLMSG_DONE and probably relied on the fact
that the parsing just stops after all the messages are walked through,
which the NLMSG_OK macro successfully did.

Resolves: https://issues.redhat.com/browse/RHEL-52449
Resolves: https://bugzilla.redhat.com/2302245
Fixes: a176d67cdfaf5b8237a7e3a80d8be0e6bdf2d8fd
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/util/virarptable.c