mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-02 16:04:52 +08:00
fix: Configure ports for Slirp networking (#1062)
This commit is contained in:
parent
c70e12f0a2
commit
b8e778a79d
@ -213,7 +213,7 @@ getSlirp() {
|
|||||||
local args=""
|
local args=""
|
||||||
local list=""
|
local list=""
|
||||||
|
|
||||||
list=$(getUserPorts)
|
list=$(getUserPorts "${USER_PORTS:-}")
|
||||||
list="${list//,/ }"
|
list="${list//,/ }"
|
||||||
list="${list## }"
|
list="${list## }"
|
||||||
list="${list%% }"
|
list="${list%% }"
|
||||||
@ -255,7 +255,7 @@ configureSlirp() {
|
|||||||
NET_OPTS="-netdev user,id=hostnet0,ipv4=on,host=$gateway,net=${gateway%.*}.0/24,dhcpstart=$ip,${ipv6}hostname=$VM_NET_HOST"
|
NET_OPTS="-netdev user,id=hostnet0,ipv4=on,host=$gateway,net=${gateway%.*}.0/24,dhcpstart=$ip,${ipv6}hostname=$VM_NET_HOST"
|
||||||
|
|
||||||
local forward=""
|
local forward=""
|
||||||
forward=$(getUserPorts "${USER_PORTS:-}")
|
forward=$(getSlirp)
|
||||||
[ -n "$forward" ] && NET_OPTS+=",$forward"
|
[ -n "$forward" ] && NET_OPTS+=",$forward"
|
||||||
|
|
||||||
if [[ "${DNSMASQ_DISABLE:-}" == [Yy1]* ]]; then
|
if [[ "${DNSMASQ_DISABLE:-}" == [Yy1]* ]]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user