Re: [EXIM] Exim 3.02 problems with new config

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Pollywog, cdysthe
CC: exim-users list
Tárgy: Re: [EXIM] Exim 3.02 problems with new config
On Thu, 24 Jun 1999, Pollywog wrote:

> 1999-06-24 22:30:57 connection from [::ffff:127.0.0.1] refused
> (::ffff:127.0.0.1 does not match any IP address for localhost)


I believe that the patch below should fix this, but I have not been able
to test it properly because I do not at present have an IPv6-enabled
system. Please let me know if I've got it right.

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




*** exim-3.02/src/host.c    Wed Jun  2 09:31:53 1999
--- host.c    Mon Jun 28 10:50:04 1999
***************
*** 1053,1061 ****
    return NULL;
    }


! else for (hh = &h; hh != NULL; hh = hh->next)
! if (strcmp(hh->address, address) == 0) return yield;

  HDEBUG(2) debug_printf("%s does not match any IP address for %s\n",
    address, yield);
  host_findbyaddr_msg =
--- 1053,1072 ----
    return NULL;
    }


! /* Found address(es) for the host name. If the incoming address is an IPv4
! address expressed in IPv6 format, we must compare the IPv4 part to any IPv4
! addresses. */

+ else
+   {
+   char *address_ipv4 = (strncmp(address, "::ffff:", 7) == 0)?
+     address + 7 : address;
+   for (hh = &h; hh != NULL; hh = hh->next)
+   if (strcmp(hh->address, (strchr(hh->address, ':') == NULL)?
+     address_ipv4 : address) == 0)
+       return yield;
+   }
+ 
  HDEBUG(2) debug_printf("%s does not match any IP address for %s\n",
    address, yield);
  host_findbyaddr_msg =



--
*** Exim information can be found at http://www.exim.org/ ***