Committer: Tim Just <tim.just@xxxxxxxxxxxxxx> Date: Fri Mar 05 11:13:14 2010 +0100 Revision: 3619 Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: tiny Log: Registered hip_handle_i2_in_i2_sent as handle function. This function is called prior to the normal packet processing to check wether the packet should be dropped or not. (See RFC5201 4.4.2 Table 4.) Modified: M hipd/init.c M hipd/input.c === modified file 'hipd/init.c' --- hipd/init.c 2010-03-05 10:06:35 +0000 +++ hipd/init.c 2010-03-05 10:13:14 +0000 @@ -447,6 +447,7 @@ hip_register_handle_function(HIP_I2, HIP_STATE_UNASSOCIATED, &hip_send_r2, 1100); hip_register_handle_function(HIP_I2, HIP_STATE_I1_SENT, &hip_handle_i2, 1000); hip_register_handle_function(HIP_I2, HIP_STATE_I1_SENT, &hip_send_r2, 1100); + hip_register_handle_function(HIP_I2, HIP_STATE_I2_SENT, &hip_handle_i2_in_i2_sent, 900); hip_register_handle_function(HIP_I2, HIP_STATE_I2_SENT, &hip_handle_i2, 1000); hip_register_handle_function(HIP_I2, HIP_STATE_I2_SENT, &hip_send_r2, 1100); hip_register_handle_function(HIP_I2, HIP_STATE_R2_SENT, &hip_handle_i2, 1000); === modified file 'hipd/input.c' --- hipd/input.c 2010-03-05 10:06:35 +0000 +++ hipd/input.c 2010-03-05 10:13:14 +0000 @@ -1301,7 +1301,7 @@ HIP_IFEL(ctx->drop_packet, -1, - "Abort packet processing.\n") + "Abort packet processing.\n"); if (hip_hit_is_bigger(&ctx->hadb_entry->hit_peer, &ctx->hadb_entry->hit_our)) { @@ -1361,6 +1361,11 @@ int if_index = 0; struct sockaddr_storage ss_addr; struct sockaddr *addr = NULL; + + HIP_IFEL(ctx->drop_packet, + -1, + "Abort packet processing.\n"); + #ifdef CONFIG_HIP_PERFORMANCE HIP_DEBUG("Start PERF_I2\n"); hip_perf_start_benchmark(perf_set, PERF_I2);