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

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog NewStuff OptionLists.txt exim/exim-src/src acl.c expand.c globals.c globals.h host.c readconf.c route.c verify.c exim/exim-src/src/lookups dns
ph10 2005/12/06 10:25:59 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog NewStuff OptionLists.txt 
    exim-src/src         acl.c expand.c globals.c globals.h host.c 
                         readconf.c route.c verify.c 
    exim-src/src/lookups dnsdb.c lsearch.c 
    exim-src/src/routers dnslookup.c ipliteral.c iplookup.c 
                         rf_lookup_hostlist.c 
    exim-src/src/transports smtp.c 
  Log:
  Add disable_ipv6, tidy up calls to string_is_ip_address().


  Revision  Changes    Path
  1.271     +2 -0      exim/exim-doc/doc-txt/ChangeLog
  1.78      +13 -0     exim/exim-doc/doc-txt/NewStuff
  1.13      +2 -1      exim/exim-doc/doc-txt/OptionLists.txt
  1.52      +1 -1      exim/exim-src/src/acl.c
  1.48      +2 -2      exim/exim-src/src/expand.c
  1.43      +1 -0      exim/exim-src/src/globals.c
  1.31      +1 -0      exim/exim-src/src/globals.h
  1.19      +29 -20    exim/exim-src/src/host.c
  1.15      +2 -2      exim/exim-src/src/lookups/dnsdb.c
  1.6       +1 -1      exim/exim-src/src/lookups/lsearch.c
  1.16      +3 -2      exim/exim-src/src/readconf.c
  1.7       +1 -1      exim/exim-src/src/route.c
  1.9       +1 -1      exim/exim-src/src/routers/dnslookup.c
  1.7       +3 -2      exim/exim-src/src/routers/ipliteral.c
  1.5       +1 -1      exim/exim-src/src/routers/iplookup.c
  1.5       +1 -1      exim/exim-src/src/routers/rf_lookup_hostlist.c
  1.18      +1 -1      exim/exim-src/src/transports/smtp.c
  1.30      +3 -3      exim/exim-src/src/verify.c


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.270
  retrieving revision 1.271
  diff -u -r1.270 -r1.271
  --- ChangeLog    5 Dec 2005 14:38:18 -0000    1.270
  +++ ChangeLog    6 Dec 2005 10:25:59 -0000    1.271
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.270 2005/12/05 14:38:18 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.271 2005/12/06 10:25:59 ph10 Exp $


Change log file for Exim from version 4.21
-------------------------------------------
@@ -16,6 +16,8 @@

   PH/02 The ipliteral router was not recognizing addresses of the form user@
         [ipv6:....] because it didn't know about the "ipv6:" prefix.
  +
  +PH/03 Added disable_ipv6.



Exim version 4.60

  Index: NewStuff
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/NewStuff,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- NewStuff    21 Nov 2005 09:51:21 -0000    1.77
  +++ NewStuff    6 Dec 2005 10:25:59 -0000    1.78
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.77 2005/11/21 09:51:21 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.78 2005/12/06 10:25:59 ph10 Exp $


   New Features in Exim
   --------------------
  @@ -7,6 +7,19 @@
   but have not yet made it into the main manual (which is most conveniently
   updated when there is a relatively large batch of changes). The doc/ChangeLog
   file contains a listing of all changes, including bug fixes.
  +
  +Version 4.61
  +------------
  +
  +PH/01 There is a new global option called disable_ipv6, which does exactly what
  +      its name implies. If set true, even if the Exim binary has IPv6 support,
  +      no IPv6 activities take place. AAAA records are never looked up as a for
  +      host names given in manual routing data or elsewhere. AAAA records that
  +      are received from the DNS as additional data for MX records are ignored.
  +      Any IPv6 addresses that are listed in local_interfaces, manualroute route
  +      data, etc. are also ignored. If IP literals are enabled, the ipliteral
  +      router declines to handle IPv6 literal addresses.
  +


Version 4.60
------------

  Index: OptionLists.txt
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/OptionLists.txt,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- OptionLists.txt    15 Nov 2005 16:10:51 -0000    1.12
  +++ OptionLists.txt    6 Dec 2005 10:25:59 -0000    1.13
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/OptionLists.txt,v 1.12 2005/11/15 16:10:51 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/OptionLists.txt,v 1.13 2005/12/06 10:25:59 ph10 Exp $


   LISTS OF EXIM OPTIONS
   ---------------------
  @@ -158,8 +158,9 @@
   directory                            string*         unset         appendfile
   directory_mode                       octal-integer   0700          appendfile
   directory_transport                  string*         unset         redirect          4.00
  +disable_ipv6                         boolean         false         main              4.61
   disable_logging                      boolean         false         routers           4.11
  -disable_logging                      boolean         false         transports        4.11
  +                                                     false         transports        4.11
   dns_again_means_nonexist             domain list     unset         main              1.89
   dns_check_names_pattern              string          +             main              2.11
   dns_csa_search_limit                 integer         5             main              4.60


  Index: acl.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/acl.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- acl.c    14 Nov 2005 16:09:54 -0000    1.51
  +++ acl.c    6 Dec 2005 10:25:59 -0000    1.52
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/acl.c,v 1.51 2005/11/14 16:09:54 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/acl.c,v 1.52 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1146,7 +1146,7 @@
   address literals, but it's probably the most friendly thing to do. This is an
   extension to CSA, so we allow it to be turned off for proper conformance. */


  -if (string_is_ip_address(domain, NULL))
  +if (string_is_ip_address(domain, NULL) != 0)
     {
     if (!dns_csa_use_reverse) return CSA_UNKNOWN;
     dns_build_reverse(domain, target);


  Index: expand.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/expand.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- expand.c    15 Nov 2005 10:08:25 -0000    1.47
  +++ expand.c    6 Dec 2005 10:25:59 -0000    1.48
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/expand.c,v 1.47 2005/11/15 10:08:25 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/expand.c,v 1.48 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1713,7 +1713,7 @@
       case ECOND_ISIP4:
       case ECOND_ISIP6:
       rc = string_is_ip_address(sub[0], NULL);
  -    *yield = ((cond_type == ECOND_ISIP)? (rc > 0) :
  +    *yield = ((cond_type == ECOND_ISIP)? (rc != 0) :
                (cond_type == ECOND_ISIP4)? (rc == 4) : (rc == 6)) == testfor;
       break;


  @@ -1973,7 +1973,7 @@
       goto MATCHED_SOMETHING;


       case ECOND_MATCH_IP:       /* Match IP address in a host list */
  -    if (sub[0][0] != 0 && string_is_ip_address(sub[0], NULL) <= 0)
  +    if (sub[0][0] != 0 && string_is_ip_address(sub[0], NULL) == 0)
         {
         expand_string_message = string_sprintf("\"%s\" is not an IP address",
           sub[0]);


  Index: globals.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- globals.c    15 Nov 2005 10:08:25 -0000    1.42
  +++ globals.c    6 Dec 2005 10:25:59 -0000    1.43
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.c,v 1.42 2005/11/15 10:08:25 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.c,v 1.43 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -482,6 +482,7 @@
   int     demime_ok              = 0;
   uschar *demime_reason          = NULL;
   #endif
  +BOOL    disable_ipv6           = FALSE;
   BOOL    disable_logging        = FALSE;


#ifdef EXPERIMENTAL_DOMAINKEYS

  Index: globals.h
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.h,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- globals.h    15 Nov 2005 10:08:25 -0000    1.30
  +++ globals.h    6 Dec 2005 10:25:59 -0000    1.31
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.h,v 1.30 2005/11/15 10:08:25 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.h,v 1.31 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -271,6 +271,7 @@
   extern int     demime_ok;              /* Nonzero if message has been demimed */
   extern uschar *demime_reason;          /* Reason for broken MIME container */
   #endif
  +extern BOOL    disable_ipv6;           /* Don't do any IPv6 things */
   extern BOOL    disable_logging;        /* Disables log writing when TRUE */


#ifdef EXPERIMENTAL_DOMAINKEYS

  Index: host.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/host.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- host.c    21 Nov 2005 12:04:23 -0000    1.18
  +++ host.c    6 Dec 2005 10:25:59 -0000    1.19
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/host.c,v 1.18 2005/11/21 12:04:23 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/host.c,v 1.19 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -774,11 +774,16 @@


   while ((s = string_nextinlist(&list, &sep, buffer, sizeof(buffer))) != NULL)
     {
  +  int ipv;
     int port = host_address_extract_port(s);            /* Leaves just the IP address */
  -  if (string_is_ip_address(s, NULL) == 0)
  +  if ((ipv = string_is_ip_address(s, NULL)) == 0)
       log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Malformed IP address \"%s\" in %s",
         s, name);


  +  /* Skip IPv6 addresses if IPv6 is disabled. */
  +
  +  if (disable_ipv6 && ipv == 6) continue;
  +
     /* This use of strcpy() is OK because we have checked that s is a valid IP
     address above. The field in the ip_address_item is large enough to hold an
     IPv6 address. */
  @@ -1965,17 +1970,17 @@
       return HOST_FIND_AGAIN;
     }


-/* In an IPv6 world, we need to scan for both kinds of address, so go round the
-loop twice. Note that we have ensured that AF_INET6 is defined even in an IPv4
-world, which makes for slightly tidier code. However, if dns_ipv4_lookup
-matches the domain, we also just do IPv4 lookups here (except when testing
-standalone). */
+/* In an IPv6 world, unless IPv6 has been disabled, we need to scan for both
+kinds of address, so go round the loop twice. Note that we have ensured that
+AF_INET6 is defined even in an IPv4 world, which makes for slightly tidier
+code. However, if dns_ipv4_lookup matches the domain, we also just do IPv4
+lookups here (except when testing standalone). */

   #if HAVE_IPV6
     #ifndef STAND_ALONE
  -  if (dns_ipv4_lookup != NULL &&
  +  if (disable_ipv6 || (dns_ipv4_lookup != NULL &&
           match_isinlist(host->name, &dns_ipv4_lookup, 0, NULL, NULL, MCL_DOMAIN,
  -          TRUE, NULL) == OK)
  +          TRUE, NULL) == OK))
       { af = AF_INET; times = 1; }
     else
     #endif  /* STAND_ALONE */
  @@ -2249,18 +2254,18 @@
     return HOST_FOUND;
     }


-/* On an IPv6 system, go round the loop up to three times, looking for A6 and
-AAAA records the first two times. However, unless doing standalone testing, we
-force an IPv4 lookup if the domain matches dns_ipv4_lookup is set. Since A6
-records look like being abandoned, support them only if explicitly configured
-to do so. On an IPv4 system, go round the loop once only, looking only for A
-records. */
+/* On an IPv6 system, unless IPv6 is disabled, go round the loop up to three
+times, looking for A6 and AAAA records the first two times. However, unless
+doing standalone testing, we force an IPv4 lookup if the domain matches
+dns_ipv4_lookup is set. Since A6 records look like being abandoned, support
+them only if explicitly configured to do so. On an IPv4 system, go round the
+loop once only, looking only for A records. */

   #if HAVE_IPV6
     #ifndef STAND_ALONE
  -    if (dns_ipv4_lookup != NULL &&
  +    if (disable_ipv6 || (dns_ipv4_lookup != NULL &&
           match_isinlist(host->name, &dns_ipv4_lookup, 0, NULL, NULL, MCL_DOMAIN,
  -        TRUE, NULL) == OK)
  +        TRUE, NULL) == OK))
         i = 0;    /* look up A records only */
       else
     #endif        /* STAND_ALONE */
  @@ -2893,10 +2898,14 @@


     if (rr->type != T_A
     #if HAVE_IPV6
  -    && rr->type != T_AAAA
  -    #ifdef SUPPORT_A6
  -    && rr->type != T_A6
  -    #endif
  +    && ( disable_ipv6 ||
  +         (
  +         rr->type != T_AAAA
  +         #ifdef SUPPORT_A6
  +         && rr->type != T_A6
  +         #endif
  +         )
  +       )
     #endif
       ) continue;



  Index: readconf.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/readconf.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- readconf.c    15 Nov 2005 10:08:25 -0000    1.15
  +++ readconf.c    6 Dec 2005 10:25:59 -0000    1.16
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/readconf.c,v 1.15 2005/11/15 10:08:25 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/readconf.c,v 1.16 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -194,6 +194,7 @@
     { "deliver_drop_privilege",   opt_bool,        &deliver_drop_privilege },
     { "deliver_queue_load_max",   opt_fixed,       &deliver_queue_load_max },
     { "delivery_date_remove",     opt_bool,        &delivery_date_remove },
  +  { "disable_ipv6",             opt_bool,        &disable_ipv6 },
     { "dns_again_means_nonexist", opt_stringptr,   &dns_again_means_nonexist },
     { "dns_check_names_pattern",  opt_stringptr,   &check_dns_names_pattern },
     { "dns_csa_search_limit",     opt_int,         &dns_csa_search_limit },
  @@ -2832,9 +2833,9 @@
       struct hostent *hostdata;


       #if HAVE_IPV6
  -    if (dns_ipv4_lookup == NULL ||
  +    if (!disable_ipv6 && (dns_ipv4_lookup == NULL ||
            match_isinlist(hostname, &dns_ipv4_lookup, 0, NULL, NULL, MCL_DOMAIN,
  -           TRUE, NULL) != OK)
  +           TRUE, NULL) != OK))
         af = AF_INET6;
       #else
       af = AF_INET;


  Index: route.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/route.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- route.c    12 Sep 2005 15:09:55 -0000    1.6
  +++ route.c    6 Dec 2005 10:25:59 -0000    1.7
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/route.c,v 1.6 2005/09/12 15:09:55 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/route.c,v 1.7 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1854,7 +1854,7 @@


       DEBUG(D_route) debug_printf("%s [%s] translated to %s\n",
         h->name, h->address, newaddress);
  -    if (string_is_ip_address(newaddress, NULL) > 0)
  +    if (string_is_ip_address(newaddress, NULL) != 0)
         {
         h->address = newaddress;
         continue;


  Index: verify.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/verify.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- verify.c    28 Nov 2005 10:07:55 -0000    1.29
  +++ verify.c    6 Dec 2005 10:25:59 -0000    1.30
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/verify.c,v 1.29 2005/11/28 10:07:55 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/verify.c,v 1.30 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1093,7 +1093,7 @@
                 {
                 nexthost = host->next;
                 if (tf.gethostbyname ||
  -                  string_is_ip_address(host->name, NULL) > 0)
  +                  string_is_ip_address(host->name, NULL) != 0)
                   (void)host_find_byname(host, NULL, &canonical_name, TRUE);
                 else
                   {
  @@ -1983,7 +1983,7 @@
   /* If the pattern is an IP address, optionally followed by a bitmask count, do
   a (possibly masked) comparision with the current IP address. */


  -if (string_is_ip_address(ss, &maskoffset) > 0)
  +if (string_is_ip_address(ss, &maskoffset) != 0)
     return (host_is_in_net(cb->host_address, ss, maskoffset)? OK : FAIL);


   /* See if there is a semicolon in the pattern */
  @@ -2784,7 +2784,7 @@
       while ((keydomain = string_nextinlist(&key, &keysep, keybuffer,
               sizeof(keybuffer))) != NULL)
         {
  -      if (string_is_ip_address(keydomain, NULL) > 0)
  +      if (string_is_ip_address(keydomain, NULL) != 0)
           {
           uschar keyrevadd[128];
           invert_address(keyrevadd, keydomain);


  Index: dnsdb.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/lookups/dnsdb.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- dnsdb.c    10 Jun 2005 18:59:35 -0000    1.14
  +++ dnsdb.c    6 Dec 2005 10:25:59 -0000    1.15
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/lookups/dnsdb.c,v 1.14 2005/06/10 18:59:35 fanf2 Exp $ */
  +/* $Cambridge: exim/exim-src/src/lookups/dnsdb.c,v 1.15 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -221,7 +221,7 @@
   it is treated as one item. */


   if (type == T_PTR && keystring[0] != '<' &&
  -    string_is_ip_address(keystring, NULL) > 0)
  +    string_is_ip_address(keystring, NULL) != 0)
     sep = -1;


   /* Now scan the list and do a lookup for each item */
  @@ -241,7 +241,7 @@
     doing the reversal is now in a separate function. */


     if ((type == T_PTR || type == T_CSA) &&
  -      string_is_ip_address(domain, NULL) > 0)
  +      string_is_ip_address(domain, NULL) != 0)
       {
       dns_build_reverse(domain, rbuffer);
       domain = rbuffer;


  Index: lsearch.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/lookups/lsearch.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- lsearch.c    15 Nov 2005 09:44:33 -0000    1.5
  +++ lsearch.c    6 Dec 2005 10:25:59 -0000    1.6
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/lookups/lsearch.c,v 1.5 2005/11/15 09:44:33 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/lookups/lsearch.c,v 1.6 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -378,7 +378,7 @@
   {
   do_cache = do_cache;  /* Keep picky compilers happy */
   if ((length == 1 && keystring[0] == '*') ||
  -    string_is_ip_address(keystring, NULL) > 0)
  +    string_is_ip_address(keystring, NULL) != 0)
     {
     return internal_lsearch_find(handle, filename, keystring, length, result,
       errmsg, LSEARCH_IP);


  Index: dnslookup.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/routers/dnslookup.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- dnslookup.c    19 Sep 2005 18:00:47 -0000    1.8
  +++ dnslookup.c    6 Dec 2005 10:25:59 -0000    1.9
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/routers/dnslookup.c,v 1.8 2005/09/19 18:00:47 fanf2 Exp $ */
  +/* $Cambridge: exim/exim-src/src/routers/dnslookup.c,v 1.9 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -323,7 +323,7 @@
       else
         {
         addr->message = US"all relevant MX records point to non-existent hosts";
  -      if (!allow_mx_to_ip && string_is_ip_address(h.name, NULL) > 0)
  +      if (!allow_mx_to_ip && string_is_ip_address(h.name, NULL) != 0)
           {
           addr->user_message =
             string_sprintf("It appears that the DNS operator for %s\n"


  Index: ipliteral.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/routers/ipliteral.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ipliteral.c    5 Dec 2005 14:38:18 -0000    1.6
  +++ ipliteral.c    6 Dec 2005 10:25:59 -0000    1.7
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/routers/ipliteral.c,v 1.6 2005/12/05 14:38:18 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/routers/ipliteral.c,v 1.7 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -104,7 +104,7 @@
   uschar *domain = addr->domain;
   uschar *ip;
   int len = Ustrlen(domain);
  -int rc;
  +int rc, ipv;


   addr_new = addr_new;         /* Keep picky compilers happy */
   addr_succeed = addr_succeed;
  @@ -124,7 +124,8 @@
   if (strncmpic(ip, US"IPV6:", 5) == 0 || strncmpic(ip, US"IPV4:", 5) == 0)
     ip += 5;


  -if (string_is_ip_address(ip, NULL) == 0)
  +ipv = string_is_ip_address(ip, NULL);
  +if (ipv == 0 || (disable_ipv6 && ipv == 6))
     {
     domain[len-1] = ']';
     return DECLINE;


  Index: iplookup.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/routers/iplookup.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- iplookup.c    12 Sep 2005 15:09:55 -0000    1.4
  +++ iplookup.c    6 Dec 2005 10:25:59 -0000    1.5
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/routers/iplookup.c,v 1.4 2005/09/12 15:09:55 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/routers/iplookup.c,v 1.5 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -202,7 +202,7 @@
     host->mx = MX_NONE;
     host->next = NULL;


  -  if (string_is_ip_address(host->name, NULL))
  +  if (string_is_ip_address(host->name, NULL) != 0)
       host->address = host->name;
     else
       {


  Index: rf_lookup_hostlist.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/routers/rf_lookup_hostlist.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- rf_lookup_hostlist.c    9 Aug 2005 13:31:53 -0000    1.4
  +++ rf_lookup_hostlist.c    6 Dec 2005 10:25:59 -0000    1.5
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/routers/rf_lookup_hostlist.c,v 1.4 2005/08/09 13:31:53 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/routers/rf_lookup_hostlist.c,v 1.5 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -103,7 +103,7 @@
     /* If explicitly configured to look up by name, or if the "host name" is
     actually an IP address, do a byname lookup. */


  -  else if (lookup_type == lk_byname || string_is_ip_address(h->name, NULL) > 0)
  +  else if (lookup_type == lk_byname || string_is_ip_address(h->name, NULL) != 0)
       {
       DEBUG(D_route|D_host_lookup) debug_printf("calling host_find_byname\n");
       rc = host_find_byname(h, ignore_target_hosts, &canonical_name, TRUE);


  Index: smtp.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/transports/smtp.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- smtp.c    9 Aug 2005 13:31:53 -0000    1.17
  +++ smtp.c    6 Dec 2005 10:25:59 -0000    1.18
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/transports/smtp.c,v 1.17 2005/08/09 13:31:53 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/transports/smtp.c,v 1.18 2005/12/06 10:25:59 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -2260,7 +2260,7 @@
         /* Find by name if so configured, or if it's an IP address. We don't
         just copy the IP address, because we need the test-for-local to happen. */


  -      if (ob->gethostbyname || string_is_ip_address(host->name, NULL) > 0)
  +      if (ob->gethostbyname || string_is_ip_address(host->name, NULL) != 0)
           rc = host_find_byname(host, NULL, &canonical_name, TRUE);
         else
           {