[exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim…

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: exim-cvs
Subject: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src/routers rf_lookup_hostlist.c exim/exim-test/dnszones-src db.test.ex exim/exim-test/scripts/0000-Basic 0430 exim/exim-test/std
ph10 2007/03/14 11:22:23 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src/routers rf_lookup_hostlist.c 
    exim-test/dnszones-src db.test.ex 
    exim-test/scripts/0000-Basic 0430 
    exim-test/stdout     0430 
  Log:
  Fix manualroute bug for localhost following multihomed host.


  Revision  Changes    Path
  1.495     +7 -0      exim/exim-doc/doc-txt/ChangeLog
  1.10      +9 -4      exim/exim-src/src/routers/rf_lookup_hostlist.c
  1.6       +5 -0      exim/exim-test/dnszones-src/db.test.ex
  1.2       +2 -0      exim/exim-test/scripts/0000-Basic/0430
  1.5       +4 -0      exim/exim-test/stdout/0430


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.494
  retrieving revision 1.495
  diff -u -r1.494 -r1.495
  --- ChangeLog    13 Mar 2007 16:37:57 -0000    1.494
  +++ ChangeLog    14 Mar 2007 11:22:23 -0000    1.495
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.494 2007/03/13 16:37:57 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.495 2007/03/14 11:22:23 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -167,6 +167,13 @@
         to "ignore", to completely ignore a host whose IP address cannot be
         found. If all hosts are ignored, the behaviour is controlled by the new
         host_all_ignored option.
  +
  +PH/39 In a list of hosts for manualroute, if one item (either because of multi-
  +      homing or because of multiple MX records with /mx) generated more than
  +      one IP address, and the following item turned out to be the local host,
  +      all the secondary addresses of the first item were incorrectly removed
  +      from the list, along with the local host and any following hosts (which
  +      is what is supposed to happen).



Exim version 4.66

  Index: rf_lookup_hostlist.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/routers/rf_lookup_hostlist.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- rf_lookup_hostlist.c    13 Mar 2007 15:32:48 -0000    1.9
  +++ rf_lookup_hostlist.c    14 Mar 2007 11:22:23 -0000    1.10
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/routers/rf_lookup_hostlist.c,v 1.9 2007/03/13 15:32:48 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/routers/rf_lookup_hostlist.c,v 1.10 2007/03/14 11:22:23 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -64,13 +64,13 @@
   "self" option in the configuration. */


   prev = NULL;
  -for (h = addr->host_list; h != NULL; prev = h, h = next_h)
  +for (h = addr->host_list; h != NULL; h = next_h)
     {
     uschar *canonical_name;
     int rc, len, port;


     next_h = h->next;
  -  if (h->address != NULL) continue;
  +  if (h->address != NULL) { prev = h; continue; }


     DEBUG(D_route|D_host_lookup)
       debug_printf("finding IP address for %s\n", h->name);
  @@ -160,8 +160,7 @@
       if (hff_code == hff_ignore)
         {
         if (prev == NULL) addr->host_list = next_h; else prev->next = next_h;
  -      h = prev;   /* Because the loop sets prev to h */
  -      continue;   /* With the next host */
  +      continue;   /* With the next host, leave prev unchanged */
         }


       if (hff_code == hff_pass) return PASS;
  @@ -213,6 +212,12 @@
         }
       self_send = TRUE;
       }
  +
  +  /* Ensure that prev is the host before next_h; this will not be h if a lookup
  +  found multiple addresses or multiple MX records. */
  +
  +  prev = h;
  +  while (prev->next != next_h) prev = prev->next;
     }


return OK;

  Index: db.test.ex
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/dnszones-src/db.test.ex,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- db.test.ex    3 Oct 2006 15:11:22 -0000    1.5
  +++ db.test.ex    14 Mar 2007 11:22:23 -0000    1.6
  @@ -1,4 +1,4 @@
  -; $Cambridge: exim/exim-test/dnszones-src/db.test.ex,v 1.5 2006/10/03 15:11:22 ph10 Exp $
  +; $Cambridge: exim/exim-test/dnszones-src/db.test.ex,v 1.6 2007/03/14 11:22:23 ph10 Exp $


   ; This is a testing zone file for use when testing DNS handling in Exim. This
   ; is a fake zone of no real use - hence no SOA record. The zone name is
  @@ -311,6 +311,11 @@
   mxt14        MX  4  ten-5-6.test.ex.
                MX  5  ten-5.test.ex.
                MX  6  ten-6.test.ex.
  +
  +; Non-local hosts with different precedence
  +
  +mxt15        MX 10  ten-1.test.ex.
  +             MX 20  ten-2.test.ex.


; Large number of IP addresses at one MX value, and then some
; at another, to check that hosts_max_try tries the MX different

  Index: 0430
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/scripts/0000-Basic/0430,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 0430    7 Feb 2006 10:54:33 -0000    1.1
  +++ 0430    14 Mar 2007 11:22:23 -0000    1.2
  @@ -28,3 +28,5 @@
   ****
   exim -DLIST=mxt11a.test.ex/MX:ten-6.test.ex -bt x@???
   ****
  +exim -DLIST=mxt15.test.ex/MX:localhost.test.ex -bt x@???
  +****


  Index: 0430
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stdout/0430,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- 0430    9 Oct 2006 14:38:57 -0000    1.4
  +++ 0430    14 Mar 2007 11:22:23 -0000    1.5
  @@ -55,3 +55,7 @@
     router = r2, transport = t1
     host ten-6.test.ex [V4NET.0.0.6] 
     host ten-1.test.ex [V4NET.0.0.1] MX=6
  +x@???
  +  router = r1, transport = t1
  +  host ten-1.test.ex [V4NET.0.0.1] MX=10
  +  host ten-2.test.ex [V4NET.0.0.2] MX=20