Re: [PATCH 4/4] netfilter: sysctl support of logger choice.

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

 



Hi,

Patrick McHardy a écrit :
> Eric Leblond wrote:
>> +static int nf_log_proc_dostring(ctl_table *table, int write, struct
>> file *filp,
>
>> +    for (i = NFPROTO_UNSPEC; i < NFPROTO_NUMPROTO; i++) {
>> +        char *pr_name = kmalloc(3, GFP_KERNEL);
>> +        /* FIXME free at deinit but there is currently no deinit */
>> +        snprintf(pr_name, 3, "%d", i);
>> +        nf_log_sysctl_table[i].ctl_name    = i;
> 
> This ctl_name use seems rather abusive. The names are used
> as numeric identifiers, we can't just stuff index values in
> there :)

Your remark is not clear for me. I store here a integer which is the
protocol number. I see it as a real numeric identifier.

Which change are you suggesting ?

BR,
-- 
Eric Leblond <eric@xxxxxx>
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/
--
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