mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-25 22:15:20 +00:00
remote: use a separate connection for nwfilter APIs
Reviewed-by: John Ferlan <jferlan@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
3ebf8f5b80
commit
ad2b3fdd1c
@ -77,6 +77,7 @@ struct daemonClientPrivate {
|
|||||||
virConnectPtr interfaceConn;
|
virConnectPtr interfaceConn;
|
||||||
virConnectPtr networkConn;
|
virConnectPtr networkConn;
|
||||||
virConnectPtr nodedevConn;
|
virConnectPtr nodedevConn;
|
||||||
|
virConnectPtr nwfilterConn;
|
||||||
|
|
||||||
daemonClientStreamPtr streams;
|
daemonClientStreamPtr streams;
|
||||||
};
|
};
|
||||||
|
@ -1751,6 +1751,8 @@ void remoteClientFree(void *data)
|
|||||||
virConnectClose(priv->networkConn);
|
virConnectClose(priv->networkConn);
|
||||||
if (priv->nodedevConn)
|
if (priv->nodedevConn)
|
||||||
virConnectClose(priv->nodedevConn);
|
virConnectClose(priv->nodedevConn);
|
||||||
|
if (priv->nwfilterConn)
|
||||||
|
virConnectClose(priv->nwfilterConn);
|
||||||
|
|
||||||
VIR_FREE(priv);
|
VIR_FREE(priv);
|
||||||
}
|
}
|
||||||
@ -1826,6 +1828,7 @@ remoteDispatchConnectOpen(virNetServerPtr server ATTRIBUTE_UNUSED,
|
|||||||
priv->interfaceConn = virObjectRef(priv->conn);
|
priv->interfaceConn = virObjectRef(priv->conn);
|
||||||
priv->networkConn = virObjectRef(priv->conn);
|
priv->networkConn = virObjectRef(priv->conn);
|
||||||
priv->nodedevConn = virObjectRef(priv->conn);
|
priv->nodedevConn = virObjectRef(priv->conn);
|
||||||
|
priv->nwfilterConn = virObjectRef(priv->conn);
|
||||||
|
|
||||||
/* force update the @readonly attribute which was inherited from the
|
/* force update the @readonly attribute which was inherited from the
|
||||||
* virNetServerService object - this is important for sockets that are RW
|
* virNetServerService object - this is important for sockets that are RW
|
||||||
|
@ -134,6 +134,9 @@ sub get_conn_arg {
|
|||||||
if ($type =~ /remote_nonnull_node_device/) {
|
if ($type =~ /remote_nonnull_node_device/) {
|
||||||
return "priv->nodedevConn";
|
return "priv->nodedevConn";
|
||||||
}
|
}
|
||||||
|
if ($type =~ /remote_nonnull_nwfilter/) {
|
||||||
|
return "priv->nwfilterConn";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# This is for the few virConnect APIs that
|
# This is for the few virConnect APIs that
|
||||||
@ -148,6 +151,9 @@ sub get_conn_arg {
|
|||||||
if ($proc =~ /Node.*Device/) {
|
if ($proc =~ /Node.*Device/) {
|
||||||
return "priv->nodedevConn";
|
return "priv->nodedevConn";
|
||||||
}
|
}
|
||||||
|
if ($proc =~ /Connect.*NWFilter/) {
|
||||||
|
return "priv->nwfilterConn";
|
||||||
|
}
|
||||||
|
|
||||||
return "priv->conn";
|
return "priv->conn";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user