diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2013-02-08 13:29:10 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2013-02-08 13:29:10 +0000 |
commit | c0763036888f12b698708e00663085b20c991541 (patch) | |
tree | 4145cb8a825278c417765eb4a97adfe055531533 | |
parent | 41f114767c014c8a751d73797546213f25eb4c85 (diff) |
retain the MX address order as sent by the lka for MXs with the same
preference.
issue spotted by todd@
ok gilles@
-rw-r--r-- | usr.sbin/smtpd/mta.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c index 6e2c9f659af..1338471035a 100644 --- a/usr.sbin/smtpd/mta.c +++ b/usr.sbin/smtpd/mta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta.c,v 1.153 2013/02/05 11:45:18 gilles Exp $ */ +/* $OpenBSD: mta.c,v 1.154 2013/02/08 13:29:09 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -304,7 +304,7 @@ mta_imsg(struct mproc *p, struct imsg *imsg) mx->host = mta_host((struct sockaddr*)&ss); mx->preference = preference; TAILQ_FOREACH(imx, &domain->mxs, entry) { - if (imx->preference >= mx->preference) { + if (imx->preference > mx->preference) { TAILQ_INSERT_BEFORE(imx, mx, entry); return; } |