m/n/c/network: add support for static network configuration
For certain network configurations autoconfiguration doesn't work or
is not appropriate, so for these a static configuration needs to be
used. The monorepo has recently gained net.proto, a Protobuf-based
network specification. This implements support for using this instead of
autoconfiguration in the Monogon network service.
Change-Id: Ifaec4e98b5a871308bde94c26fc09a7f0bcfd064
Reviewed-on: https://review.monogon.dev/c/monogon/+/1364
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/node/core/main.go b/metropolis/node/core/main.go
index 721482b..bd7f475 100644
--- a/metropolis/node/core/main.go
+++ b/metropolis/node/core/main.go
@@ -107,7 +107,8 @@
logger.Warningf("Failed to initialize TPM 2.0, attempting fallback to untrusted: %v", err)
}
- networkSvc := network.New()
+ networkSvc := network.New(nil)
+ networkSvc.DHCPVendorClassID = "dev.monogon.metropolis.node.v1"
timeSvc := timesvc.New()
// This function initializes a headless Delve if this is a debug build or