[hipl-commit] [trunk] Rev 4708: HITs in /etc/hosts fix

  • From: Artturi Karila <artturi.karila@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Thu, 3 Jun 2010 13:29:21 +0300

Committer: Artturi Karila <artturi.karila@xxxxxxxxxx>
Date: 03/06/2010 at 13:29:21
Revision: 4708
Revision-id: artturi.karila@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  HITs in /etc/hosts fix
  
  Corrected hip_map_id_to_ip_from_hosts_files() to look for the HIT also in 
/etc/hosts.

Modified:
  M  lib/core/hostsfiles.c

=== modified file 'lib/core/hostsfiles.c'
--- lib/core/hostsfiles.c       2010-06-01 15:28:02 +0000
+++ lib/core/hostsfiles.c       2010-06-03 10:29:21 +0000
@@ -483,9 +483,12 @@
     memset(hostname, 0, sizeof(hostname));
 
     if (hit && !ipv6_addr_any(hit)) {
-        err = hip_for_each_hosts_file_line(HIPL_HOSTS_FILE,
-                                           
hip_map_first_id_to_hostname_from_hosts,
-                                           hit, hostname);
+        err = (hip_for_each_hosts_file_line(HIPL_HOSTS_FILE,
+                                           
hip_map_first_id_to_hostname_from_hosts,
+                                           hit, hostname) &&
+               hip_for_each_hosts_file_line(HOSTS_FILE,
+                                           
hip_map_first_id_to_hostname_from_hosts,
+                                           hit, hostname));
     } else {
         struct in6_addr mapped_lsi;
         IPV4_TO_IPV6_MAP(lsi, &mapped_lsi);

Other related posts:

  • » [hipl-commit] [trunk] Rev 4708: HITs in /etc/hosts fix - Artturi Karila