dhcpd timegm error check

Theo Buehler <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
Another straightforward conversion:

Index: parse.c
===================================================================
RCS file: /cvs/src/usr.sbin/dhcpd/parse.c,v
diff -u -p -r1.29 parse.c
--- parse.c	27 Jun 2024 16:39:31 -0000	1.29
+++ parse.c	20 Jun 2026 03:27:57 -0000
@@ -552,8 +552,9 @@ parse_date(FILE *cfile)
 		}
 	}
 
+	tm.tm_wday = -1;
 	guess = timegm(&tm);
-	if (guess == -1) {
+	if (guess == -1 && tm.tm_wday == -1) {
 		parse_warn("time could not be represented");
 		return (0);
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.