[hipl-commit] [tiny] Rev 3571: Handling of CLOSE packets now uses libmodularization.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 24 Feb 2010 17:05:48 +0200

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: Wed Feb 24 16:05:30 2010 +0100
Revision: 3571
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: tiny

Log:
  Handling of CLOSE packets now uses libmodularization.

Modified:
  M  hipd/close.c
  M  hipd/init.c
  M  hipd/input.c

=== modified file 'hipd/close.c'
--- hipd/close.c        2010-02-24 10:15:34 +0000
+++ hipd/close.c        2010-02-24 15:05:30 +0000
@@ -193,10 +193,9 @@
              "Received illegal controls in CLOSE: 0x%x. Dropping\n",
              ntohs(ctx->msg->control));
 
-    if (!ctx->hadb_entry) {
-        HIP_DEBUG("No HA for the received close\n");
-        goto out_err;
-    }
+    HIP_IFEL(!ctx->hadb_entry, -1,
+             "No entry in host association database when receiving R2." \
+             "Dropping.\n");
 
     switch (ha_state) {
     case HIP_STATE_ESTABLISHED:

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-02-24 14:59:13 +0000
+++ hipd/init.c 2010-02-24 15:05:30 +0000
@@ -506,6 +506,24 @@
     hip_register_handle_function(HIP_NOTIFY, HIP_STATE_CLOSING,     
&hip_handle_notify, 0);
     hip_register_handle_function(HIP_NOTIFY, HIP_STATE_CLOSED,      
&hip_handle_notify, 0);
 
+    hip_register_handle_function(HIP_CLOSE, HIP_STATE_UNASSOCIATED, 
&hip_drop_packet, 0);
+    hip_register_handle_function(HIP_CLOSE, HIP_STATE_I1_SENT,      
&hip_drop_packet, 0);
+    hip_register_handle_function(HIP_CLOSE, HIP_STATE_I2_SENT,      
&hip_drop_packet, 0);
+    hip_register_handle_function(HIP_CLOSE, HIP_STATE_R2_SENT,      
&hip_drop_packet, 0);
+    hip_register_handle_function(HIP_CLOSE, HIP_STATE_ESTABLISHED,  
&hip_handle_close, 0);
+    hip_register_handle_function(HIP_CLOSE, HIP_STATE_CLOSING,      
&hip_handle_close, 0);
+    hip_register_handle_function(HIP_CLOSE, HIP_STATE_CLOSED,       
&hip_drop_packet, 0);
+    hip_register_handle_function(HIP_CLOSE, HIP_STATE_NONE,         
&hip_drop_packet, 0);
+
+#if 0
+#ifdef CONFIG_HIP_PERFORMANCE
+        HIP_DEBUG("Start PERF_HANDLE_CLOSE\n");
+        hip_perf_start_benchmark(perf_set, PERF_HANDLE_CLOSE);
+        HIP_DEBUG("Stop and write PERF_HANDLE_CLOSE");
+        hip_perf_stop_benchmark(perf_set, PERF_HANDLE_CLOSE);
+        hip_perf_write_benchmark(perf_set, PERF_HANDLE_CLOSE);
+#endif
+#endif
     return err;
 }
 

=== modified file 'hipd/input.c'
--- hipd/input.c        2010-02-24 14:59:13 +0000
+++ hipd/input.c        2010-02-24 15:05:30 +0000
@@ -615,16 +615,6 @@
         break;
 
     case HIP_CLOSE:
-#ifdef CONFIG_HIP_PERFORMANCE
-        HIP_DEBUG("Start PERF_HANDLE_CLOSE\n");
-        hip_perf_start_benchmark(perf_set, PERF_HANDLE_CLOSE);
-#endif
-        HIP_IFCS(ctx.hadb_entry, err = hip_handle_close(type, state, &ctx));
-#ifdef CONFIG_HIP_PERFORMANCE
-        HIP_DEBUG("Stop and write PERF_HANDLE_CLOSE");
-        hip_perf_stop_benchmark(perf_set, PERF_HANDLE_CLOSE);
-        hip_perf_write_benchmark(perf_set, PERF_HANDLE_CLOSE);
-#endif
         break;
 
     case HIP_CLOSE_ACK:

Other related posts:

  • » [hipl-commit] [tiny] Rev 3571: Handling of CLOSE packets now uses libmodularization. - Tim Just