Re: [exim-dev] DNS Loop In Callout

Página Inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Para: Tim Wilde
CC: Tony Finch, exim-dev
Assunto: Re: [exim-dev] DNS Loop In Callout
On Fri, 3 Dec 2004, Tim Wilde wrote:

> Any chance of a patch against 4.43 that addresses this (or a ballpark idea
> when to expect 4.44)? We have an application we really need to have callouts
> enabled for in this situation. Thanks for your help.


The fix is in the snapshot in

ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/Testing/exim-snapshot.tar.gz
ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/Testing/exim-snapshot.tar.gz.sig

The patch is below.

Regards,
Philip

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



*** exim-4.43/src/verify.c  Tue Oct  5 09:32:08 2004
--- verify.c    Fri Nov 12 16:23:13 2004
***************
*** 1015,1028 ****
            else
              {
              uschar *canonical_name;
!             host_item *host;
              host_build_hostlist(&host_list, s, tf.hosts_randomize);


              /* Just ignore failures to find a host address. If we don't manage
!             to find any addresses, the callout will defer. */


!             for (host = host_list; host != NULL; host = host->next)
                {
                if (tf.gethostbyname || string_is_ip_address(host->name, NULL))
                  (void)host_find_byname(host, NULL, &canonical_name, TRUE);
                else
--- 1037,1054 ----
            else
              {
              uschar *canonical_name;
!             host_item *host, *nexthost;
              host_build_hostlist(&host_list, s, tf.hosts_randomize);


              /* Just ignore failures to find a host address. If we don't manage
!             to find any addresses, the callout will defer. Note that more than 
!             one address may be found for a single host, which will result in 
!             additional host items being inserted into the chain. Hence we must 
!             save the next host first. */


!             for (host = host_list; host != NULL; host = nexthost)
                {
+               nexthost = host->next;
                if (tf.gethostbyname || string_is_ip_address(host->name, NULL))
                  (void)host_find_byname(host, NULL, &canonical_name, TRUE);
                else