hermit-os / kernel

A Rust-based, lightweight unikernel.
http://hermit-os.org
Apache License 2.0
1.11k stars 83 forks source link

Warn if `HERMIT_IP` is set and `dhcpv4` feature is enabled #1253

Closed jounathaen closed 3 weeks ago

jounathaen commented 3 weeks ago

As dhcpv4 is a default feature, it is easy to forget that it is set. If one sets HERMIT_IP (orHERMIT_GATEWAY/HERMIT_MASK) with dhcpv4 enabled, the value from the environment is ignored.

I suggest emitting a warning if dhcpv4 is enabled and HERMIT_IP, HERMIT_GATEWAY, or HERMIT_MASK is set.

(Probably just needs a few lines in https://github.com/hermit-os/kernel/blob/285f28af2b077a85723376c82ad8e38f508716d1/src/executor/device.rs#L43)