[hipl-dev] [Branch ~hipl-core/hipl/mobility-fixes] Rev 5186: source and destination need to be inverted for certain function calls

  • From: noreply@xxxxxxxxxxxxx
  • To: HIPL core team <hipl-dev@xxxxxxxxxxxxx>
  • Date: Tue, 23 Nov 2010 17:33:32 -0000

------------------------------------------------------------
revno: 5186
committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
branch nick: mobility-fixes
timestamp: Tue 2010-11-23 18:31:11 +0100
message:
  source and destination need to be inverted for certain function calls
modified:
  modules/update/hipd/update.c


--
lp:~hipl-core/hipl/mobility-fixes
https://code.launchpad.net/~hipl-core/hipl/mobility-fixes

Your team HIPL core team is subscribed to branch 
lp:~hipl-core/hipl/mobility-fixes.
To unsubscribe from this branch go to 
https://code.launchpad.net/~hipl-core/hipl/mobility-fixes/+edit-subscription
=== modified file 'modules/update/hipd/update.c'
--- modules/update/hipd/update.c        2010-11-23 15:05:53 +0000
+++ modules/update/hipd/update.c        2010-11-23 17:31:11 +0000
@@ -886,8 +886,8 @@
              "failed to look up UPDATE-specific state\n");
 
     // set active addresses
-    ipv6_addr_copy(&ctx->hadb_entry->our_addr, &ctx->src_addr);
-    ipv6_addr_copy(&ctx->hadb_entry->peer_addr, &ctx->dst_addr);
+    ipv6_addr_copy(&ctx->hadb_entry->our_addr, &ctx->dst_addr);
+    ipv6_addr_copy(&ctx->hadb_entry->peer_addr, &ctx->src_addr);
 
     // set the new spi value for the association
     ctx->hadb_entry->spi_outbound_new = ntohl(esp_info->new_spi);
@@ -898,8 +898,8 @@
     }
 
     hip_recreate_security_associations_and_sp(ctx->hadb_entry,
-                                              &ctx->src_addr,
-                                              &ctx->dst_addr);
+                                              &ctx->dst_addr,
+                                              &ctx->src_addr);
 
     HIP_IFEL(hip_send_update_to_one_peer(ctx->input_msg,
                                          ctx->hadb_entry,
@@ -923,12 +923,12 @@
 static void hip_handle_third_update_packet(struct hip_packet_context *ctx)
 {
     // set active addresses
-    ipv6_addr_copy(&ctx->hadb_entry->our_addr, &ctx->src_addr);
-    ipv6_addr_copy(&ctx->hadb_entry->peer_addr, &ctx->dst_addr);
+    ipv6_addr_copy(&ctx->hadb_entry->our_addr, &ctx->dst_addr);
+    ipv6_addr_copy(&ctx->hadb_entry->peer_addr, &ctx->src_addr);
 
     hip_recreate_security_associations_and_sp(ctx->hadb_entry,
-                                              &ctx->src_addr,
-                                              &ctx->dst_addr);
+                                              &ctx->dst_addr,
+                                              &ctx->src_addr);
 }
 
 /**

Other related posts:

  • » [hipl-dev] [Branch ~hipl-core/hipl/mobility-fixes] Rev 5186: source and destination need to be inverted for certain function calls - noreply