mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 15:45:28 +00:00
qemuBuildHostNetStr: Realign
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
7e7277345f
commit
b55c064f3b
@ -3688,11 +3688,11 @@ qemuBuildHostNetStr(virDomainNetDefPtr net,
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (netType) {
|
switch (netType) {
|
||||||
/*
|
/*
|
||||||
* If type='bridge', and we're running as privileged user
|
* If type='bridge', and we're running as privileged user
|
||||||
* or -netdev bridge is not supported then it will fall
|
* or -netdev bridge is not supported then it will fall
|
||||||
* through, -net tap,fd
|
* through, -net tap,fd
|
||||||
*/
|
*/
|
||||||
case VIR_DOMAIN_NET_TYPE_BRIDGE:
|
case VIR_DOMAIN_NET_TYPE_BRIDGE:
|
||||||
case VIR_DOMAIN_NET_TYPE_NETWORK:
|
case VIR_DOMAIN_NET_TYPE_NETWORK:
|
||||||
case VIR_DOMAIN_NET_TYPE_DIRECT:
|
case VIR_DOMAIN_NET_TYPE_DIRECT:
|
||||||
@ -3715,39 +3715,39 @@ qemuBuildHostNetStr(virDomainNetDefPtr net,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_NET_TYPE_CLIENT:
|
case VIR_DOMAIN_NET_TYPE_CLIENT:
|
||||||
virBufferAsprintf(&buf, "socket%cconnect=%s:%d",
|
virBufferAsprintf(&buf, "socket%cconnect=%s:%d",
|
||||||
type_sep,
|
type_sep,
|
||||||
net->data.socket.address,
|
net->data.socket.address,
|
||||||
net->data.socket.port);
|
net->data.socket.port);
|
||||||
type_sep = ',';
|
type_sep = ',';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_NET_TYPE_SERVER:
|
case VIR_DOMAIN_NET_TYPE_SERVER:
|
||||||
virBufferAsprintf(&buf, "socket%clisten=%s:%d",
|
virBufferAsprintf(&buf, "socket%clisten=%s:%d",
|
||||||
type_sep,
|
type_sep,
|
||||||
net->data.socket.address ? net->data.socket.address
|
net->data.socket.address ? net->data.socket.address
|
||||||
: "",
|
: "",
|
||||||
net->data.socket.port);
|
net->data.socket.port);
|
||||||
type_sep = ',';
|
type_sep = ',';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_NET_TYPE_MCAST:
|
case VIR_DOMAIN_NET_TYPE_MCAST:
|
||||||
virBufferAsprintf(&buf, "socket%cmcast=%s:%d",
|
virBufferAsprintf(&buf, "socket%cmcast=%s:%d",
|
||||||
type_sep,
|
type_sep,
|
||||||
net->data.socket.address,
|
net->data.socket.address,
|
||||||
net->data.socket.port);
|
net->data.socket.port);
|
||||||
type_sep = ',';
|
type_sep = ',';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_NET_TYPE_UDP:
|
case VIR_DOMAIN_NET_TYPE_UDP:
|
||||||
virBufferAsprintf(&buf, "socket%cudp=%s:%d,localaddr=%s:%d",
|
virBufferAsprintf(&buf, "socket%cudp=%s:%d,localaddr=%s:%d",
|
||||||
type_sep,
|
type_sep,
|
||||||
net->data.socket.address,
|
net->data.socket.address,
|
||||||
net->data.socket.port,
|
net->data.socket.port,
|
||||||
net->data.socket.localaddr,
|
net->data.socket.localaddr,
|
||||||
net->data.socket.localport);
|
net->data.socket.localport);
|
||||||
type_sep = ',';
|
type_sep = ',';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_NET_TYPE_USER:
|
case VIR_DOMAIN_NET_TYPE_USER:
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user