only set clients when we have a correct netvm IP address

This commit is contained in:
palainp 2023-06-30 17:57:08 +02:00
parent e5349c22a7
commit e99e80b150

View File

@ -54,9 +54,6 @@ module Main (R : Mirage_random.S)(Clock : Mirage_clock.MCLOCK)(Time : Mirage_tim
Dao.read_network_config qubesDB >>= fun config ->
(* config.netvm_ip might be 0.0.0.0 if there's no netvm provided via Qubes *)
(* Set up client-side networking *)
Client_eth.create config >>= fun clients ->
let connect_if_netvm =
if config.netvm_ip <> (Ipaddr.V4.make 0 0 0 0) then (
Uplink.connect config >>= fun uplink ->
@ -79,6 +76,9 @@ module Main (R : Mirage_random.S)(Clock : Mirage_clock.MCLOCK)(Time : Mirage_tim
Dao.print_network_config config ;
assert(config.netvm_ip <> (Ipaddr.V4.make 0 0 0 0));
(* Set up client-side networking *)
Client_eth.create config >>= fun clients ->
(* Set up routing between networks and hosts *)
let router = Router.create
~config