diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-08-15 13:51:28 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-08-16 08:10:02 +0200 |
commit | b4f8ffd5c4b9afee50bbc8b0003ee7d5d618d048 (patch) | |
tree | 3d397bebf0f0e015ff4532d1318bdd02d59822a0 /contrib/selinux | |
parent | 4b9f4c251344bf350454d0b9e9184ae663c39fc3 (diff) | |
download | passt-b4f8ffd5c4b9afee50bbc8b0003ee7d5d618d048.tar passt-b4f8ffd5c4b9afee50bbc8b0003ee7d5d618d048.tar.gz passt-b4f8ffd5c4b9afee50bbc8b0003ee7d5d618d048.tar.bz2 passt-b4f8ffd5c4b9afee50bbc8b0003ee7d5d618d048.tar.lz passt-b4f8ffd5c4b9afee50bbc8b0003ee7d5d618d048.tar.xz passt-b4f8ffd5c4b9afee50bbc8b0003ee7d5d618d048.tar.zst passt-b4f8ffd5c4b9afee50bbc8b0003ee7d5d618d048.zip |
netlink: Correctly calculate attribute length for address messages
In nl_addr_get() and nl_addr_dup() we step the attributes attached to each
RTM_NEWADDR message with a loop initialised with IFA_RTA() and
RTM_PAYLOAD() macros. RTM_PAYLOAD(), however is for RTM_NEWROUTE messages
(struct rtmsg), not RTM_NEWADDR messages (struct ifaddrmsg). Consequently
it miscalculates the size and means we can skip some attributes. Switch
to IFA_PAYLOAD() which we should be using here.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib/selinux')
0 files changed, 0 insertions, 0 deletions