[exim-cvs] cvs commit: exim/exim-doc/doc-docbook spec.ascd …

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Philip Hazel
Data:  
Para: exim-cvs
Assunto: [exim-cvs] cvs commit: exim/exim-doc/doc-docbook spec.ascd exim/exim-doc/doc-txt ChangeLog exim/exim-src/src/routers ipliteral.c
ph10 2005/12/05 14:38:18 GMT

  Modified files:
    exim-doc/doc-docbook spec.ascd 
    exim-doc/doc-txt     ChangeLog 
    exim-src/src/routers ipliteral.c 
  Log:
  ipliteral was not recognizing "ipv6" prefix.


  Revision  Changes    Path
  1.4       +1 -1      exim/exim-doc/doc-docbook/spec.ascd
  1.270     +3 -0      exim/exim-doc/doc-txt/ChangeLog
  1.6       +13 -7     exim/exim-src/src/routers/ipliteral.c


  Index: spec.ascd
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-docbook/spec.ascd,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- spec.ascd    15 Nov 2005 16:10:50 -0000    1.3
  +++ spec.ascd    5 Dec 2005 14:38:18 -0000    1.4
  @@ -1,5 +1,5 @@
   ////////////////////////////////////////////////////////////////////////////
  -$Cambridge: exim/exim-doc/doc-docbook/spec.ascd,v 1.3 2005/11/15 16:10:50 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-docbook/spec.ascd,v 1.4 2005/12/05 14:38:18 ph10 Exp $


   This is the primary source of the Exim Manual. It is an AsciiDoc document
   that is converted into DocBook XML for subsequent conversion into printing
  @@ -12040,7 +12040,7 @@
   %check_rfc2047_length%              check length of RFC 2047 ``encoded words''
   %delivery_date_remove%              from incoming messages
   %envelope_to_remote%                from incoming messages
  -%extract_addresses_remove_arguments%affects %-t% processing
  +%extract_addresses_remove_arguments% affects %-t% processing
   %headers_charset%                   default for translations
   %qualify_domain%                    default for senders
   %qualify_recipient%                 default for recipients


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


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -13,6 +13,9 @@
         IPv6 interfaces. In particular, ::1 was not found. The effect in Exim was
         that it would not match correctly against @[] and not recognize the IPv6
         addresses as local.
  +
  +PH/02 The ipliteral router was not recognizing addresses of the form user@
  +      [ipv6:....] because it didn't know about the "ipv6:" prefix.



Exim version 4.60

  Index: ipliteral.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/routers/ipliteral.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ipliteral.c    12 Sep 2005 15:09:55 -0000    1.5
  +++ ipliteral.c    5 Dec 2005 14:38:18 -0000    1.6
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/routers/ipliteral.c,v 1.5 2005/09/12 15:09:55 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/routers/ipliteral.c,v 1.6 2005/12/05 14:38:18 ph10 Exp $ */


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


  @@ -111,14 +112,19 @@
   DEBUG(D_route) debug_printf("%s router called for %s: domain = %s\n",
     rblock->name, addr->address, addr->domain);


-/* Check that the domain is an IP address enclosed in square brackets. If
-not, the router declines. Otherwise route to the single IP address, setting the
-host name to "(unnamed)". */
+/* Check that the domain is an IP address enclosed in square brackets. Remember
+to allow for the "official" form of IPv6 addresses. If not, the router
+declines. Otherwise route to the single IP address, setting the host name to
+"(unnamed)". */

if (domain[0] != '[' || domain[len-1] != ']') return DECLINE;
domain[len-1] = 0; /* temporarily */

  -if (string_is_ip_address(domain+1, NULL) == 0)
  +ip = domain + 1;
  +if (strncmpic(ip, US"IPV6:", 5) == 0 || strncmpic(ip, US"IPV4:", 5) == 0)
  +  ip += 5;
  +
  +if (string_is_ip_address(ip, NULL) == 0)
     {
     domain[len-1] = ']';
     return DECLINE;
  @@ -128,10 +134,10 @@
   but if it is set, it should probably work. */


   if (verify_check_this_host(&(rblock->ignore_target_hosts), NULL, domain,
  -      domain + 1, NULL) == OK)
  +      ip, NULL) == OK)
     {
     DEBUG(D_route)
  -      debug_printf("%s is in ignore_target_hosts\n", domain+1);
  +      debug_printf("%s is in ignore_target_hosts\n", ip);
     addr->message = US"IP literal host explicitly ignored";
     domain[len-1] = ']';
     return DECLINE;
  @@ -142,7 +148,7 @@
   h = store_get(sizeof(host_item));


h->next = NULL;
-h->address = string_copy(domain+1);
+h->address = string_copy(ip);
h->port = PORT_NONE;
domain[len-1] = ']'; /* restore */
h->name = string_copy(domain);