[hipl-commit] [esp] Rev 2332: added another hook to esp_prot for updates

  • From: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 03 Feb 2010 16:47:16 +0200

Committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
Date: Wed Feb 03 15:46:12 2010 +0100
Revision: 2332
Revision-id: rene.hummen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: esp

Log:
  added another hook to esp_prot for updates
  
  hopefully this should have been the last hook to add for working
  esp_prot updates

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

=== modified file 'hipd/esp_prot_hipd_msg.c'
--- hipd/esp_prot_hipd_msg.c    2010-02-03 14:34:41 +0000
+++ hipd/esp_prot_hipd_msg.c    2010-02-03 14:46:12 +0000
@@ -308,7 +308,7 @@
        {
                /* this should send an update only containing the mandatory 
params
                 * HMAC and HIP_SIGNATURE as well as the ESP_PROT_ANCHOR and the
-                * SEQ param (to garanty freshness of the ANCHOR) in the signed 
part
+                * SEQ param (to guaranty freshness of the ANCHOR) in the 
signed part
                 * of the message */
          HIP_IFEL(hip_send_update_to_one_peer(NULL, entry, &entry->our_addr,
                         &entry->peer_addr, NULL, HIP_UPDATE_ESP_ANCHOR),

=== modified file 'hipd/update.c'
--- hipd/update.c       2010-02-03 14:34:41 +0000
+++ hipd/update.c       2010-02-03 14:46:12 +0000
@@ -154,6 +154,11 @@
                     ntohl(seq->update_id)), -1, "Building of ACK failed\n");
         }
 
+        if (type == HIP_UPDATE_ESP_ANCHOR) {
+               HIP_IFEL(esp_prot_update_add_anchor(update_packet_to_send, ha),
+                               -1, "failed to add esp_prot anchor element\n");
+        }
+
 #ifdef CONFIG_HIP_MIDAUTH
 
        if (type == HIP_UPDATE_ECHO_RESPONSE) {
@@ -351,7 +356,8 @@
                         break;
                 case HIP_UPDATE_ESP_ANCHOR:
                 case HIP_UPDATE_ESP_ANCHOR_ACK:
-                                       // TODO re-implement sending of esp 
prot anchors
+                       HIP_DEBUG_IN6ADDR("Sending update from", src_addr);
+                       HIP_DEBUG_IN6ADDR("to", dst_addr);
 
                        hip_send_update_pkt(update_packet_to_send, ha, 
src_addr, dst_addr);
                        break;

Other related posts:

  • » [hipl-commit] [esp] Rev 2332: added another hook to esp_prot for updates - Rene Hummen