1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-21 10:50:24 +03:00

util: relax virNetDevSetCoalesce() stub

Currently, virNetDevSetCoalesce() stub is always returning error. As
it's used by virNetDevTapCreateInBridgePort(), it essentially breaks
bridged networking if coalesce is not supported.

To make it work, relax the stub to trigger error only when its
coalesce argument is not NULL, otherwise report success.
This commit is contained in:
Roman Bogorodskiy 2017-04-23 18:53:37 +04:00
parent 9c25d7a4ca
commit 5e010605d1

View File

@ -3155,8 +3155,11 @@ int virNetDevSetCoalesce(const char *ifname,
}
# else
int virNetDevSetCoalesce(const char *ifname,
virNetDevCoalescePtr coalesce ATTRIBUTE_UNUSED)
virNetDevCoalescePtr coalesce)
{
if (!coalesce)
return 0;
virReportSystemError(ENOSYS,
_("Cannot set coalesce info on interface '%s'"),
ifname);
@ -3213,8 +3216,11 @@ virNetDevGetFeatures(const char *ifname ATTRIBUTE_UNUSED,
}
int virNetDevSetCoalesce(const char *ifname,
virNetDevCoalescePtr coalesce ATTRIBUTE_UNUSED)
virNetDevCoalescePtr coalesce)
{
if (!coalesce)
return 0;
virReportSystemError(ENOSYS,
_("Cannot set coalesce info on interface '%s'"),
ifname);