[hipl-commit] [trunk] Rev 4339: Remove disabled code from the hipd directory.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 16 Apr 2010 21:50:41 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 16/04/2010 at 21:50:41
Revision: 4339
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Remove disabled code from the hipd directory.

Modified:
  M  hipd/blind.c
  M  hipd/close.c
  M  hipd/esp_prot_hipd_msg.c
  M  hipd/hidb.c
  M  hipd/hipd.c
  M  hipd/maintenance.c
  M  hipd/pfkeyapi.c
  M  hipd/user_ipsec_hipd_msg.c

=== modified file 'hipd/blind.c'
--- hipd/blind.c        2010-04-15 20:47:19 +0000
+++ hipd/blind.c        2010-04-16 18:50:27 +0000
@@ -274,8 +274,6 @@
     set_hit_prefix(blind_hit);
     HIP_DEBUG_HIT("HIT after prefix: ", blind_hit);
 
-    //memcpy(blind_hit, digest, sizeof(struct in6_addr));
-
 out_err:
     return err;
 }
@@ -716,9 +714,6 @@
         HIP_IFEL(!(pz = hip_get_param(msg, HIP_PARAM_PUZZLE)), -1,
                  "Internal error\n");
 
-        // FIX ME: this does not always work:
-        //get_random_bytes(pz->opaque, HIP_PUZZLE_OPAQUE_LEN);
-
         /* hardcode kludge */
         pz->opaque[0] = 'H';
         pz->opaque[1] = 'I';
@@ -740,8 +735,6 @@
     return msg;
 
 out_err:
-    //if (host_id_pub)
-    //    free(host_id_pub);
     if (msg) {
         free(msg);
     }

=== modified file 'hipd/close.c'
--- hipd/close.c        2010-04-15 20:47:19 +0000
+++ hipd/close.c        2010-04-16 18:50:27 +0000
@@ -424,10 +424,7 @@
     HIP_IFEL(ipv6_addr_any(&close_ack->hitr), -1,
              "Received NULL receiver HIT in CLOSE ACK. Dropping\n");
 
-    if (!hip_controls_sane(ntohs(close_ack->control), mask
-                           //HIP_CONTROL_CERTIFICATES | HIP_PACKET_CTRL_ANON |
-                           // | HIP_CONTROL_SHT_MASK | HIP_CONTROL_DHT_MASK)) {
-                           )) {
+    if (!hip_controls_sane(ntohs(close_ack->control), mask)) {
         HIP_ERROR("Received illegal controls in CLOSE ACK: 0x%x. Dropping\n",
                   ntohs(close_ack->control));
         goto out_err;

=== modified file 'hipd/esp_prot_hipd_msg.c'
--- hipd/esp_prot_hipd_msg.c    2010-04-13 11:10:38 +0000
+++ hipd/esp_prot_hipd_msg.c    2010-04-16 18:50:27 +0000
@@ -260,7 +260,6 @@
         param = hip_get_next_param(msg, param);
     }
 
-    //param = hip_get_next_param(msg, param);
     root_length            = *((int *) hip_get_param_contents_direct(param));
     HIP_DEBUG("root_length: %i\n", root_length);
     entry->esp_root_length = root_length;
@@ -278,7 +277,6 @@
         }
     }
 
-    //param = hip_get_next_param(msg, param);
     soft_update = *((int *) hip_get_param_contents_direct(param));
     HIP_DEBUG("soft_update: %i\n", soft_update);
 

=== modified file 'hipd/hidb.c'
--- hipd/hidb.c 2010-04-15 20:47:19 +0000
+++ hipd/hidb.c 2010-04-16 18:50:27 +0000
@@ -778,7 +778,6 @@
     HIP_READ_LOCK_DB(db);
 
     entry       = hip_get_hostid_entry_by_lhi_and_algo(db, hit, algo, -1);
-    //HIP_IFEL(!entry, "Host ID not found\n", -1);
     HIP_IFE(!entry, -1);
 
     host_id_len = hip_get_param_total_len(entry->host_id);

=== modified file 'hipd/hipd.c'
--- hipd/hipd.c 2010-04-13 15:52:03 +0000
+++ hipd/hipd.c 2010-04-16 18:50:27 +0000
@@ -501,7 +501,6 @@
         FD_SET(hip_user_sock, &read_fdset);
         FD_SET(hip_nl_ipsec.fd, &read_fdset);
         FD_SET(hip_icmp_sock, &read_fdset);
-        /* FD_SET(hip_firewall_sock, &read_fdset); */
         hip_firewall_sock = hip_user_sock;
 
         if (hip_opendht_fqdn_sent == STATE_OPENDHT_WAITING_ANSWER) {
@@ -514,9 +513,6 @@
         timeout.tv_sec  = HIP_SELECT_TIMEOUT;
         timeout.tv_usec = 0;
 
-        //HIP_DEBUG("select loop value hip_raw_socket_v4 = %d 
\n",hip_raw_sock_v4);
-        /* wait for socket activity */
-
 #ifdef CONFIG_HIP_FIREWALL
         if (hip_firewall_status < 0) {
             hip_msg_init(hipd_msg);

=== modified file 'hipd/maintenance.c'
--- hipd/maintenance.c  2010-04-15 20:47:19 +0000
+++ hipd/maintenance.c  2010-04-16 18:50:27 +0000
@@ -195,12 +195,6 @@
     struct hip_common *msg = NULL;
     int n;
 
-#if 0
-    if (!hip_agent_is_alive()) {
-        return (-ENOENT);
-    }
-#endif
-
     msg = malloc(HIP_MAX_PACKET);
     if (!msg) {
         HIP_ERROR("malloc failed\n");

=== modified file 'hipd/pfkeyapi.c'
--- hipd/pfkeyapi.c     2010-04-13 16:51:53 +0000
+++ hipd/pfkeyapi.c     2010-04-16 18:50:27 +0000
@@ -194,7 +194,6 @@
     u_int32_t seq         = 0;
     u_int flags           = 0; // always zero
     u_int64_t lifebyte    = 0, lifetime = 0;
-    //u_int8_t l_natt_type = HIP_UDP_ENCAP_ESPINUDP_NONIKE;
     u_int8_t l_natt_type  = HIP_UDP_ENCAP_ESPINUDP;
     // FIXME: this parameter maybe should be related to some esp parameters 
(according to racoon source code)
     u_int16_t l_natt_frag = 0;

=== modified file 'hipd/user_ipsec_hipd_msg.c'
--- hipd/user_ipsec_hipd_msg.c  2010-04-15 20:47:19 +0000
+++ hipd/user_ipsec_hipd_msg.c  2010-04-16 18:50:27 +0000
@@ -50,13 +50,6 @@
         default_ipsec_func_set.hip_flush_all_sa();
     }
 
-#if 0 /* see bug id 816 */
-      // send close to all peers in order to reset peer state
-      // This removes HA from HADB as well as it removes mapping
-      // BUG
-    HIP_IFEL(hip_send_close(NULL, 0), -1, "failed to close all connections");
-#endif
-
     /* reset the ipsec function set
      *
      * copied from hadb.c */

Other related posts:

  • » [hipl-commit] [trunk] Rev 4339: Remove disabled code from the hipd directory. - Diego Biurrun