From 7c341afa76951d8d4a60ce1193ed11fdba923cdb Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 5 Jun 2024 19:40:11 +0200 Subject: [PATCH] add warning if HERMIT_IP is set and dhcpv4 feature is enabled --- src/executor/device.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/executor/device.rs b/src/executor/device.rs index 83dfae38c8..2c80dd8cfc 100644 --- a/src/executor/device.rs +++ b/src/executor/device.rs @@ -54,6 +54,10 @@ impl<'a> NetworkInterface<'a> { let mut device = HermitNet::new(mtu, checksums); + if hermit_var!("HERMIT_IP").is_some() { + warn!("A static IP address is specified with the environment variable HERMIT_IP, but the device is configured to use DHCPv4!"); + } + let ethernet_addr = EthernetAddress([mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]]); let hardware_addr = HardwareAddress::Ethernet(ethernet_addr);