------------------------------------------------------------ revno: 6366 committer: Diego Biurrun <diego@xxxxxxxxxx> branch nick: hipl timestamp: Mon 2012-04-16 16:47:42 +0200 message: cosmetics: whitespace changes, comment typo fixes modified: hipd/hipd.c hipd/init.c hipd/output.c hipfw/cert.c hipfw/conntrack.c hipfw/hipfw.c lib/core/state.h test/check_lib_core.c -- lp:hipl https://code.launchpad.net/~hipl-core/hipl/trunk Your team HIPL core team is subscribed to branch lp:hipl. To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'hipd/hipd.c' --- hipd/hipd.c 2012-03-20 21:45:03 +0000 +++ hipd/hipd.c 2012-04-16 14:47:42 +0000 @@ -310,7 +310,7 @@ HIP_IFEL(hipd_init(flags), 1, "hipd_init() failed!\n"); if (flags & HIPD_START_CREATE_CONFIG_AND_EXIT) { - HIP_ERROR("Config files create, exiting...\n"); + HIP_ERROR("Config files created, exiting...\n"); return 0; } === modified file 'hipd/init.c' --- hipd/init.c 2012-03-20 12:28:24 +0000 +++ hipd/init.c 2012-04-16 14:47:42 +0000 @@ -65,9 +65,9 @@ #include "lib/core/hostsfiles.h" #include "lib/core/ife.h" #include "lib/core/modularization.h" -#include "lib/core/gpl/nlink.h" #include "lib/core/performance.h" #include "lib/core/straddr.h" +#include "lib/core/gpl/nlink.h" #include "lib/core/gpl/xfrmapi.h" #include "modules/hipd_modules.h" #include "config.h" @@ -939,7 +939,7 @@ hip_init_hadb(); /* Resolve our current addresses, afterwards the events from kernel - * will maintain the list This needs to be done before opening + * will maintain the list. This needs to be done before opening * NETLINK_ROUTE! See the comment about address_count global var. */ HIP_DEBUG("Initializing the netdev_init_addresses\n"); @@ -971,10 +971,11 @@ HIP_IFEL(hip_raw_sock_output_v4 < 0, -1, "raw sock output v4\n"); /* hip_nat_sock_input should be initialized after hip_nat_sock_output - * because for the sockets bound to the same address/port, only the last socket seems - * to receive the packets. NAT input socket is a normal UDP socket where as - * NAT output socket is a raw socket. A raw output socket support better the "shotgun" - * extension (sending packets from multiple source addresses). */ + * because for the sockets bound to the same address/port, only the last + * socket seems to receive the packets. The NAT input socket is a normal + * UDP socket whereas NAT output socket is a raw socket. A raw output + * socket better supports the "shotgun" extension (sending packets + * from multiple source addresses). */ hip_nat_sock_output_udp = init_raw_sock_v4(IPPROTO_UDP); HIP_IFEL(hip_nat_sock_output_udp < 0, -1, "raw sock output udp\n"); === modified file 'hipd/output.c' --- hipd/output.c 2012-04-17 11:20:20 +0000 +++ hipd/output.c 2012-04-16 14:47:42 +0000 @@ -261,8 +261,8 @@ */ static int add_echo_response(struct hip_packet_context *ctx, int sign) { - int param_type = sign ? - HIP_PARAM_ECHO_REQUEST_SIGN : HIP_PARAM_ECHO_REQUEST; + int param_type = sign ? HIP_PARAM_ECHO_REQUEST_SIGN + : HIP_PARAM_ECHO_REQUEST; const struct hip_echo_msg *ping = hip_get_param(ctx->input_msg, param_type); === modified file 'hipfw/cert.c' --- hipfw/cert.c 2012-03-21 13:59:10 +0000 +++ hipfw/cert.c 2012-04-16 14:47:42 +0000 @@ -53,7 +53,7 @@ #include "cert.h" // runtime configuration -static int use_cert = false; +static int use_cert = false; static STACK_OF(X509) *root_chain = NULL; === modified file 'hipfw/conntrack.c' --- hipfw/conntrack.c 2012-04-17 11:20:20 +0000 +++ hipfw/conntrack.c 2012-04-16 14:47:42 +0000 @@ -1114,7 +1114,7 @@ * Process an I1 packet. This function sets up a new connection for the HIT * tuple conveyed in the packet's HIP header. * - * @param common the R1 packet + * @param common the I1 packet * @param tuple the corresponding connection tuple * @param ctx the context * @@ -1128,7 +1128,6 @@ if (tuple) { HIP_DEBUG("I1 for existing connection, " "re-establishing connection state\n"); - remove_connection(tuple->connection); } @@ -1172,7 +1171,7 @@ return 0; } - //if peer hit is all-zero in I1 packet, replace it with pseudo hit + /* If peer HIT is all-zero in I1 packet, replace it with pseudo HIT. */ if (IN6_ARE_ADDR_EQUAL(&common->hit_receiver, &all_zero_addr)) { hip_opportunistic_ipv6_to_hit(&ctx->dst, &phit, HIP_HIT_TYPE_HASH100); @@ -1185,7 +1184,8 @@ return 0; } - tuple = get_tuple_by_hits(&data->src_hit, &data->dst_hit); + tuple = get_tuple_by_hits(&data->src_hit, + &data->dst_hit); tuple->connection->state = HIP_STATE_I1_SENT; free(data); @@ -1243,7 +1243,7 @@ struct tuple *const tuple, struct hip_fw_context *const ctx) { - const struct hip_esp_info *const esp_info = hip_get_param(common, HIP_PARAM_ESP_INFO); + const struct hip_esp_info *const esp_info = hip_get_param(common, HIP_PARAM_ESP_INFO); if (!hipfw_midauth_verify_challenge(ctx, common)) { HIP_ERROR("failed to verify midauth challenge\n"); @@ -1292,7 +1292,7 @@ struct tuple *const tuple, const struct hip_fw_context *const ctx) { - const struct hip_esp_info *const esp_info = hip_get_param(common, HIP_PARAM_ESP_INFO); + const struct hip_esp_info *const esp_info = hip_get_param(common, HIP_PARAM_ESP_INFO); if (!hipfw_midauth_verify_challenge(ctx, common)) { HIP_ERROR("failed to verify midauth challenge\n"); @@ -1485,7 +1485,6 @@ ntohl(esp_info->old_spi)))) { HIP_DEBUG("existing ESP state does not include current SPI, " "re-establishing connection state\n"); - remove_connection(tuple->connection); if (insert_connection_from_update(common, ctx, esp_info)) { @@ -2319,7 +2318,6 @@ HIP_DEBUG("Connection timed out:\n"); HIP_DEBUG_HIT("src HIT", &conn->original.hip_tuple->data->src_hit); HIP_DEBUG_HIT("dst HIT", &conn->original.hip_tuple->data->dst_hit); - remove_connection(conn); } } === modified file 'hipfw/hipfw.c' --- hipfw/hipfw.c 2012-04-17 11:20:20 +0000 +++ hipfw/hipfw.c 2012-04-16 14:47:42 +0000 @@ -950,17 +950,14 @@ // check the HIP packet type (I1, UPDATE, etc.) if (match && rule->type) { HIP_DEBUG("type\n"); - if (!match_int(rule->type->value, - buf->type_hdr, + if (!match_int(rule->type->value, buf->type_hdr, rule->type->boolean)) { match = 0; } HIP_DEBUG("type rule: %d, packet: %d, boolean: %d, match: %d\n", - rule->type->value, - buf->type_hdr, - rule->type->boolean, - match); + rule->type->value, buf->type_hdr, + rule->type->boolean, match); } /* this checks, if the the input interface of the packet @@ -972,15 +969,13 @@ } HIP_DEBUG("in_if rule: %s, packet: %s, boolean: %d, match: %d \n", - rule->in_if->value, - in_if, rule->in_if->boolean, match); + rule->in_if->value, in_if, rule->in_if->boolean, match); } /* this checks, if the the output interface of the packet matches the * one specified in the rule */ if (match && rule->out_if) { - if (!match_string(rule->out_if->value, - out_if, + if (!match_string(rule->out_if->value, out_if, rule->out_if->boolean)) { match = 0; } @@ -994,7 +989,8 @@ * must be last, so not called if packet is going to be * dropped */ if (match && rule->state) { - int filter_state_verdict = filter_state(buf, rule->state, rule->accept, ctx); + int filter_state_verdict = filter_state(buf, rule->state, + rule->accept, ctx); /* we at least had some packet before -> check * this packet this will also check the signature of @@ -1448,7 +1444,7 @@ goto end_init; } - HIP_DEBUG("UDP header size is %d (in header: %u) \n", + HIP_DEBUG("UDP header size is %d (in header: %u)\n", sizeof(struct udphdr), ntohs(udphdr->len)); HIP_DEBUG("UDP src port: %u\n", ntohs(udphdr->source)); HIP_DEBUG("UDP dst port: %u\n", ntohs(udphdr->dest)); === modified file 'lib/core/state.h' --- lib/core/state.h 2012-03-14 18:28:39 +0000 +++ lib/core/state.h 2012-04-16 14:47:42 +0000 @@ -297,9 +297,9 @@ struct timeval bex_start; struct timeval bex_end; - uint32_t pacing; - uint8_t ice_control_role; - struct hip_esp_info *nat_esp_info; + uint32_t pacing; + uint8_t ice_control_role; + struct hip_esp_info *nat_esp_info; /** disable SAs on this HA (currently used only by full relay) */ int disable_sas; === modified file 'test/check_lib_core.c' --- test/check_lib_core.c 2012-03-13 15:27:06 +0000 +++ test/check_lib_core.c 2012-04-16 14:47:42 +0000 @@ -35,7 +35,7 @@ int main(void) { - int number_failed; + int number_failed; SRunner *sr = srunner_create(NULL); srunner_add_suite(sr, lib_core_cert());