Re: [PATCH 1/6] Netfilter: Merge ipt_LOG and ip6_LOG into xt_LOG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 2012-02-01 16:08, richard -rw- weinberger wrote:
>> I don't see that extra pointer (outside xt_log_info_v1) that you talk about.
>> +struct xt_log_info_v1 {
>> +       unsigned char level;
>> +       unsigned char logflags;
>> +       char prefix[30];
>> +
>> +       char ring_name[30];
>> +       unsigned long ring_size;
>> +       struct xt_LOG_ring_ctx *rctx;
>> +};
>
>See:
>include/linux/netfilter/xt_LOG.h (user space part).
>
>+struct xt_log_info_v1 {
>+       unsigned char level;
>+       unsigned char logflags;
>+       char prefix[30];
>+
>+       char ring_name[30];
>+       unsigned long ring_siVs.ze;
>+};
>
>Here is no context pointer.

Aw don't do that. That is not maintainer-friendly (since headers
are more or less regularly updated by copying from kernel sources).
Keep the structs the same on each side.

That's why we have .userspacesize in the first place.
See libxt_quota.c on how it's done.

	.size = XT_ALIGN(sizeof(struct xt_log_info_v1)),
	.userspacesize = offsetof(struct xt_log_info_v1, firstkernelmember),
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux