openvpn icon indicating copy to clipboard operation
openvpn copied to clipboard

fix incorrect use of `M_ERR` in dns.c

Open cron2 opened this issue 3 weeks ago • 0 comments

dns.c:        msg(M_ERR | M_ERRNO, "run_dns_up_down: unable to create pipes");
dns.c:        msg(M_ERR | M_ERRNO, "run_dns_up_down: unable to fork");
dns.c:                msg(M_ERR | M_ERRNO, "could not send dns vars filename");
dns.c:                msg(M_ERR | M_ERRNO, "could not receive dns updown status");

but

error.h:#define M_ERRNO (1u << 8)         /* show errno description */
error.h:#define M_ERR    (M_FATAL | M_ERRNO)

so combining M_ERR | M_ERRNO makes little sense. If we want this fatal, M_ERR is enough, if we want to proceed afterwards, the rest of the code tends to use M_WARN | M_ERRNO.

cron2 avatar Dec 15 '25 13:12 cron2