[hipl-commit] [trunk] Rev 4326: Remove disabled code from hipd/cookie.c.

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

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 16/04/2010 at 21:43:02
Revision: 4326
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Remove disabled code from hipd/cookie.c.

Modified:
  M  hipd/cookie.c

=== modified file 'hipd/cookie.c'
--- hipd/cookie.c       2010-04-15 20:47:19 +0000
+++ hipd/cookie.c       2010-04-16 18:42:51 +0000
@@ -196,42 +196,6 @@
     idx = hip_calc_cookie_idx(ip_i, ip_r, peer_hit);
     HIP_DEBUG("Calculated index: %d\n", idx);
 
-    /* the code under if 0 periodically changes the puzzle. It is not included
-     * in compilation as there is currently no easy way of signing the R1 
packet
-     * after having changed its puzzle.
-     */
-#if 0
-    /* generating opaque data */
-    do_gettimeofday(&tv);
-
-    /* extract the puzzle */
-    if (!(pz = hip_get_param(err->r1, HIP_PARAM_PUZZLE)), NULL,
-        "Internal error: Could not find PUZZLE parameter in precreated R1 
packet\n") {
-        ;
-    }
-
-    ts  = pz->opaque[0];
-    ts |= ((int) pz->opaque[1] << 8);
-
-    if (ts != 0) {
-        /* check if the cookie is too old */
-        diff = (tv.tv_sec & 0xFFFFFF) - ts;
-        if (diff < 0) {
-            diff += 0x1000000;
-        }
-
-        HIP_DEBUG("Old puzzle still valid\n");
-        if (diff <= HIP_PUZZLE_MAX_LIFETIME) {
-            return err;
-        }
-    }
-
-    /* either ts == 0 or diff > HIP_PUZZLE_MAX_LIFETIME */
-    _HIP_DEBUG("Creating new puzzle\n");
-    hip_create_new_puzzle(pz, r1, &tv);
-
-    /* XXX: sign the R1 */
-#endif
     /* Create a copy of the found entry */
     len = hip_get_msg_total_len(hip_r1table[idx].r1);
     r1  = hip_msg_alloc();

Other related posts:

  • » [hipl-commit] [trunk] Rev 4326: Remove disabled code from hipd/cookie.c. - Diego Biurrun