mirror of
https://github.com/mirage/qubes-mirage-firewall.git
synced 2025-07-09 16:39:37 -04:00
only set clients when we have a correct netvm IP address
This commit is contained in:
parent
e5349c22a7
commit
e99e80b150
1 changed files with 3 additions and 3 deletions
|
@ -54,9 +54,6 @@ module Main (R : Mirage_random.S)(Clock : Mirage_clock.MCLOCK)(Time : Mirage_tim
|
||||||
Dao.read_network_config qubesDB >>= fun config ->
|
Dao.read_network_config qubesDB >>= fun config ->
|
||||||
(* config.netvm_ip might be 0.0.0.0 if there's no netvm provided via Qubes *)
|
(* 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 =
|
let connect_if_netvm =
|
||||||
if config.netvm_ip <> (Ipaddr.V4.make 0 0 0 0) then (
|
if config.netvm_ip <> (Ipaddr.V4.make 0 0 0 0) then (
|
||||||
Uplink.connect config >>= fun uplink ->
|
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 ;
|
Dao.print_network_config config ;
|
||||||
assert(config.netvm_ip <> (Ipaddr.V4.make 0 0 0 0));
|
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 *)
|
(* Set up routing between networks and hosts *)
|
||||||
let router = Router.create
|
let router = Router.create
|
||||||
~config
|
~config
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue