mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
macvtap: fix 2 nla_put expressions (non-serious bug)
This patch fixes 2 occurrences of nla_put expression with a '!' in front of them that basically prevented the detection that the buffer is too small. However, code further below would then detect that the buffer is too small when further parts are added to the netlink message.
This commit is contained in:
parent
9962e406c6
commit
be23e2bd65
@ -1048,8 +1048,8 @@ doPortProfileOpSetLink(bool nltarget_kernel,
|
||||
|
||||
memcpy(ifla_vf_mac.mac, macaddr, 6);
|
||||
|
||||
if (!nla_put(nl_msg, IFLA_VF_MAC, sizeof(ifla_vf_mac),
|
||||
&ifla_vf_mac) < 0)
|
||||
if (nla_put(nl_msg, IFLA_VF_MAC, sizeof(ifla_vf_mac),
|
||||
&ifla_vf_mac) < 0)
|
||||
goto buffer_too_small;
|
||||
}
|
||||
|
||||
@ -1060,8 +1060,8 @@ doPortProfileOpSetLink(bool nltarget_kernel,
|
||||
.qos = 0,
|
||||
};
|
||||
|
||||
if (!nla_put(nl_msg, IFLA_VF_VLAN, sizeof(ifla_vf_vlan),
|
||||
&ifla_vf_vlan) < 0)
|
||||
if (nla_put(nl_msg, IFLA_VF_VLAN, sizeof(ifla_vf_vlan),
|
||||
&ifla_vf_vlan) < 0)
|
||||
goto buffer_too_small;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user