Skip to content

Commit 72e2f60

Browse files
keep dnsmasq's echo_stderr for --test
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
1 parent 0bbd16a commit 72e2f60

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/dnsmasq/log.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,10 @@ void my_syslog(int priority, const char *format, ...)
330330
FTL_dnsmasq_log(buffer, priority, func, len > MAX_MESSAGE ? MAX_MESSAGE : len);
331331

332332
/* Pi-hole: FTL owns pihole.log. Bypass dnsmasq's file-write path
333-
and syslog fallback entirely. */
334-
return;
335-
/*******************************************************************************/
336-
337-
338-
if (echo_stderr)
333+
and syslog fallback entirely.
334+
Keep echo_stderr so dnsmasq --test errors reach stderr (captured
335+
by test_dnsmasq_config() in src/config/dnsmasq_config.c). */
336+
if (echo_stderr)
339337
{
340338
fprintf(stderr, "dnsmasq%s: ", func);
341339
va_start(ap, format);
@@ -344,6 +342,9 @@ void my_syslog(int priority, const char *format, ...)
344342
fputc('\n', stderr);
345343
}
346344

345+
return;
346+
/*******************************************************************************/
347+
347348
if (log_fd == -1)
348349
{
349350
#ifdef __ANDROID__

0 commit comments

Comments
 (0)