summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-01-26 18:40:41 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2018-01-26 20:05:56 +0000
commitf83a760f108f79279c210e208bb02c270569a951 (patch)
tree0e0e5540ae4296f6bae8d555397363b09fdd5548 /src
parent06fdb9f73dedfffc8b8613017ec1bb23f970b246 (diff)
Cutthrough: fix for port-number defined by router. Bug 2229
Diffstat (limited to 'src')
-rw-r--r--src/src/verify.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/src/verify.c b/src/src/verify.c
index dd5451848..eb479d440 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -388,18 +388,21 @@ if (addr->transport == cutthrough.addr.transport)
host_af = Ustrchr(host->address, ':') ? AF_INET6 : AF_INET;
- if (!smtp_get_interface(tf->interface, host_af, addr, &interface,
- US"callout") ||
- !smtp_get_port(tf->port, addr, &port, US"callout"))
+ if ( !smtp_get_interface(tf->interface, host_af, addr, &interface,
+ US"callout")
+ || !smtp_get_port(tf->port, addr, &port, US"callout")
+ )
log_write(0, LOG_MAIN|LOG_PANIC, "<%s>: %s", addr->address,
addr->message);
+ smtp_port_for_connect(host, port);
+
if ( ( interface == cutthrough.interface
|| ( interface
&& cutthrough.interface
&& Ustrcmp(interface, cutthrough.interface) == 0
) )
- && port == cutthrough.host.port
+ && host->port == cutthrough.host.port
)
{
uschar * resp = NULL;