Skip to content

Commit

Permalink
Merge pull request #1254 from stlankes/dhcpv4
Browse files Browse the repository at this point in the history
add warning if HERMIT_IP is set and dhcpv4 feature is enabled
  • Loading branch information
jounathaen authored Jun 6, 2024
2 parents 9881cfb + efb47b5 commit 0bb0186
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/executor/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 0bb0186

Please sign in to comment.