[PATCH] convert mport to multiport

Patrick McHardy kaber at trash.net
Mon Sep 27 01:36:34 CEST 2004


Hi Pablo,

Pablo Neira wrote:

> Hi again Patrick,
>
> I think that some comments about the patch could help you to review 
> it, so here we go :-)

Thanks, I appreciate it :)

>> +/* every entry in ports[] except for the last one has one bit in pflags
>> + * associated with it. If this bit is set, the port is the first 
>> port of
>> + * a portrange, with the next entry being the last.
>> + * End of list is marked with pflags bit set and port=65535.
>> + * If 14 ports are used (last one does not have a pflag), the last port
>> + * is repeated to fill the last entry in ports[] */
>> struct ipt_multiport
>> {
>> -    u_int8_t flags;                /* Type of comparison */
>> -    u_int8_t count;                /* Number of ports */
>> +    u_int8_t flags:2;            /* Type of comparison */
>> +    u_int16_t pflags:14;            /* Port flags */
>>     u_int16_t ports[IPT_MULTI_PORTS];    /* Ports */
>> +    u_int8_t count;                         /* Number of ports */
>>  
>>

This breaks userspace compatibility. We can't do that, sorry.

Regards
Patrick




More information about the netfilter-devel mailing list