[hipl-commit] [tiny] Rev 3586: Fixed bug regarding update out id counter.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Mon, 1 Mar 2010 12:18:56 +0200

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: Mon Mar 01 11:13:28 2010 +0100
Revision: 3586
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: tiny

Log:
  Fixed bug regarding update out id counter.
  
  To meet all requirements from RFC5201 the internal representation of
  update out id and the packet value differ.
  
  Call hip_update_get_out_id to get the current value of update out id.

Modified:
  M  modules/update/hipd/update.c

=== modified file 'modules/update/hipd/update.c'
--- modules/update/hipd/update.c        2010-02-25 17:31:28 +0000
+++ modules/update/hipd/update.c        2010-03-01 10:13:28 +0000
@@ -721,7 +721,7 @@
 
     /* RFC 5201 Section 6.12: Receiving UPDATE Packets */
     HIP_DEBUG("previous incoming update id=%u\n", localstate->update_id_in);
-    HIP_DEBUG("previous outgoing update id=%u\n", localstate->update_id_out);
+    HIP_DEBUG("previous outgoing update id=%u\n", 
hip_update_get_out_id(localstate));
 
     /* RFC 5201 Section 6.12: 3th or 4th step:
      *
@@ -738,7 +738,7 @@
                   ack_peer_update_id);
         /*ha->hadb_update_func->hip_update_handle_ack(
          *      ha, ack, has_esp_info);*/
-        if (ack_peer_update_id != localstate->update_id_out) {
+        if (ack_peer_update_id != hip_update_get_out_id(localstate)) {
             // Simplified logic of RFC 5201 6.12.2, 1st step:
             // We drop the packet if the Update ID in the ACK
             // parameter does not equal to the last outgoing Update ID
@@ -746,7 +746,7 @@
                       "equal to the last outgoing Update ID (%u). "
                       "Dropping the packet.\n",
                       ack_peer_update_id,
-                      localstate->update_id_out);
+                      hip_update_get_out_id(localstate));
             err = -1;
             goto out_err;
         }

Other related posts:

  • » [hipl-commit] [tiny] Rev 3586: Fixed bug regarding update out id counter. - Tim Just