Merge remote-tracking branch 'origin/pr/318'

* origin/pr/318:
  Pass network parameters to linux-stubdom

Fixes QubesOS/qubes-issues#5022
This commit is contained in:
Marek Marczykowski-Górecki 2020-02-17 03:55:43 +01:00
commit 2f4b42e5cd
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 10 additions and 3 deletions

View File

@ -1439,7 +1439,7 @@ class TC_90_QubesVM(QubesVMTestsMixin, qubes.tests.QubesTestCase):
<script path="vif-route-qubes" />
</interface>
<!-- server_ip is the address of stubdomain. It hosts it's own DNS server. -->
<emulator type="stubdom-linux" />
<emulator type="stubdom-linux" cmdline="-qubes-net:client_ip=10.137.0.1,dns_0=10.139.1.1,dns_1=10.139.1.2,gw=10.137.0.2,netmask=255.255.255.255" />
<input type="tablet" bus="usb"/>
<video>
<model type="vga"/>

View File

@ -166,13 +166,20 @@
{% else %}
type="stubdom"
{% endif %}
{% if vm.netvm and not
vm.features.check_with_template('linux-stubdom', True) %}
{% if vm.netvm %}
{% if vm.features.check_with_template('linux-stubdom', True) %}
cmdline="-qubes-net:client_ip={{ vm.ip -}}
,dns_0={{ vm.dns[0] -}}
,dns_1={{ vm.dns[1] -}}
,gw={{ vm.netvm.gateway -}}
,netmask={{ vm.netmask }}"
{% else %}
cmdline="-net lwip,client_ip={{ vm.ip -}}
,server_ip={{ vm.dns[1] -}}
,dns={{ vm.dns[0] -}}
,gw={{ vm.netvm.gateway -}}
,netmask={{ vm.netmask }}"
{% endif %}
{% endif %}
{% if vm.stubdom_mem %}
memory="{{ vm.stubdom_mem * 1024 -}}"