Include interface name when malformed IP is detected

This commit is contained in:
Neshura 2024-09-30 11:39:43 +02:00
parent 3f41b8958e
commit afb4dd8ff3
Signed by: Neshura
GPG key ID: 4E2D47B1374C297D

View file

@ -37,7 +37,7 @@ impl InterfaceConfig {
let interface_address = match self.interfaces.get(interface_name) {
Some(address) => *address,
None => {
let err_msg = "Malformed IP in interfaces.toml";
let err_msg = format!("Malformed or missing IP in interfaces.toml for interface {}", interface_name);
match connected_to_journal() {
true => error!("[ERROR] {err_msg}"),
false => eprintln!("[ERROR] {err_msg}"),