← Back to team overview

hipl-core team mailing list archive

Re: [Branch ~christof-mroz/hipl/hipfw-performance] Rev 4942: Update src_ip and dst_ip more often in tuples, in order to support opp-mode.

 

On 15.09.2010, at 16:09, noreply@xxxxxxxxxxxxx wrote:
> ------------------------------------------------------------
> revno: 4942
> committer: Christof Mroz <christof.mroz@xxxxxxxxxxxxxx>
> branch nick: hipfw-performance
> timestamp: Wed 2010-09-15 16:02:30 +0200
> message:
>  Update src_ip and dst_ip more often in tuples, in order to support opp-mode.
> modified:
>  firewall/conntrack.c
> 
> 
> --
> lp:~christof-mroz/hipl/hipfw-performance
> https://code.launchpad.net/~christof-mroz/hipl/hipfw-performance
> 
> Your team HIPL core team is subscribed to branch lp:~christof-mroz/hipl/hipfw-performance.
> To unsubscribe from this branch go to https://code.launchpad.net/~christof-mroz/hipl/hipfw-performance/+edit-subscription
> === modified file 'firewall/conntrack.c'
> --- firewall/conntrack.c	2010-09-15 13:59:27 +0000
> +++ firewall/conntrack.c	2010-09-15 14:02:30 +0000
> @@ -571,13 +571,6 @@
>     connection->reply.hip_tuple->data->src_hi    = NULL;
>     connection->reply.hip_tuple->data->verify    = NULL;
> 
> -#ifdef CONFIG_HIP_DEBUG
> -    memcpy(&connection->original.src_ip, &ctx->src, sizeof(struct in6_addr));
> -    memcpy(&connection->original.dst_ip, &ctx->dst, sizeof(struct in6_addr));
> -    memcpy(&connection->reply.src_ip,    &ctx->dst, sizeof(struct in6_addr));
> -    memcpy(&connection->reply.dst_ip,    &ctx->src, sizeof(struct in6_addr));
> -#endif
> -
>     //add tuples to list
>     hipList = append_to_list(hipList, connection->original.hip_tuple);
>     hipList = append_to_list(hipList, connection->reply.hip_tuple);
> @@ -1738,6 +1731,11 @@
>         }
> 
>         tuple->hook = ctx->ipq_packet->hook;
> +
> +        #ifdef CONFIG_HIP_DEBUG
> +        memcpy(&tuple->src_ip, &ctx->src, sizeof(struct in6_addr));
> +        memcpy(&tuple->dst_ip, &ctx->dst, sizeof(struct in6_addr));
> +        #endif

It seems a bit odd to me that the removed and new statements are surrounded by "CONFIG_HIP_DEBUG" implying that this piece of code will only be executed with --enable-debug (default) specified at compile-time. Are you sure you want to change state information only in this case?

>     }
> 
>     HIP_DEBUG("udp_encap_hdr=%p tuple=%p err=%d\n", ctx->udp_encap_hdr, tuple, err);




--
Dipl.-Inform. Rene Hummen, Ph.D. Student
Distributed Systems Group
RWTH Aachen University, Germany
tel: +49 241 80 20772
web: http://ds.rwth-aachen.de/members/hummen




Follow ups

References