From f83a760f108f79279c210e208bb02c270569a951 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 26 Jan 2018 18:40:41 +0000 Subject: Cutthrough: fix for port-number defined by router. Bug 2229 --- src/src/verify.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3