summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpea <pea@cvs.openbsd.org>2009-03-11 11:11:09 +0000
committerpea <pea@cvs.openbsd.org>2009-03-11 11:11:09 +0000
commit021ea646299455c09a15854f398276d2fd541cc0 (patch)
treebc90a7212781c8b5a8ba3ae911c17aa233fdb34e
parentdb7af90a5fc3e66241f815ff8072883f757c67a1 (diff)
getmxbyname() returning a value != 0 does not necessarily means it failed
ok gilles@
-rw-r--r--usr.sbin/smtpd/lka.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index 45c6b891194..96d61911218 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.34 2009/03/09 16:31:09 jacekm Exp $ */
+/* $OpenBSD: lka.c,v 1.35 2009/03/11 11:11:08 pea Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -352,7 +352,7 @@ lka_dispatch_mta(int sig, short event, void *p)
if (mxreq->rule.r_action == A_RELAY) {
log_debug("attempting to resolve %s", mxreq->hostname);
len = getmxbyname(mxreq->hostname, &mx);
- if (len != 0) {
+ if (len < 0) {
mxrep.getaddrinfo_error = len;
imsg_compose(ibuf, IMSG_LKA_MX_END, 0, 0, -1,
&mxrep, sizeof(struct mxrep));