hipl-core team mailing list archive
-
hipl-core team
-
Mailing list archive
-
Message #00180
Re: [Branch ~hipl-core/hipl/trunk] Rev 4928: Sanitize packet context handling (hip_packet_context)
On Mon, Sep 13, 2010 at 02:04:26PM +0000, noreply@xxxxxxxxxxxxx wrote:
> Merge authors:
> Christof Mroz (christof-mroz)
> message:
> Sanitize packet context handling (hip_packet_context)
>
> --- hipd/hipd.c 2010-09-02 18:20:43 +0000
> +++ hipd/hipd.c 2010-09-09 01:12:24 +0000
> @@ -435,20 +429,11 @@
>
> - if (ctx.input_msg) {
> + if(ctx.input_msg) {
This was correct before.
> - if (ctx.msg_ports) {
> - free(ctx.msg_ports);
> + if(ctx.output_msg) {
> + free(ctx.output_msg);
if (
> --- lib/core/protodefs.h 2010-08-17 17:23:18 +0000
> +++ lib/core/protodefs.h 2010-09-09 01:12:24 +0000
> @@ -1128,18 +1128,24 @@
>
> /**
> - * Structure used during packet handling to store the incoming message,
> - * source address, destination address, the used ports, the host association
> - * database entry and a flag indicating the packet handling should be aborted.
> + * A data structure for storing the source and destination ports of a packet.
> + */
> +struct hip_portpair_t {
The _t namespace is reserved for POSIX, you should avoid it.
I'm aware that HIPL pollutes namespaces left and right, but we
should not add to the problem. Also, in the cases I remember
offhand HIPL uses the _t names for the typedefs, not for the
structs.
> + struct hip_common *input_msg; /**< Incoming message. */
nit: Capitalizing such nonsentences is IMO silly.
Diego
Follow ups
References