diff options
author | 2019-03-22 10:42:26 +0000 | |
---|---|---|
committer | 2019-03-22 10:42:26 +0000 | |
commit | 4a26c82d813d34695ef90d21f0365807c781f887 (patch) | |
tree | 363fba14ee787ca9caa2567b0b9e829e71cfdcb1 | |
parent | update the alc entry; (diff) | |
download | wireguard-openbsd-4a26c82d813d34695ef90d21f0365807c781f887.tar.xz wireguard-openbsd-4a26c82d813d34695ef90d21f0365807c781f887.zip |
No need to log that the DHCP lease file doesn't exist.
We still want to log other causes when failing to open the lease file,
but then do so with a more helpful error message.
ok florian@
-rw-r--r-- | sbin/unwind/unwind.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/unwind/unwind.c b/sbin/unwind/unwind.c index 4d02153fb70..310cc811a74 100644 --- a/sbin/unwind/unwind.c +++ b/sbin/unwind/unwind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unwind.c,v 1.18 2019/03/02 16:11:10 florian Exp $ */ +/* $OpenBSD: unwind.c,v 1.19 2019/03/22 10:42:26 jca Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -882,7 +882,8 @@ open_dhcp_lease(int if_idx) log_debug("lease file name: %s", lease_filename); if ((fd = open(lease_filename, O_RDONLY)) == -1) { - log_warn(NULL); + if (errno != ENOENT) + log_warn("cannot open lease file %s", lease_filename); return; } |