Re: [PATCH 12/27] xt_hashlimit match, revision 1

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

 



On Jan 4 2008 15:59, Patrick McHardy wrote:
>> -#define XT_HASHLIMIT_HASH_DIP	0x0001
>> -#define XT_HASHLIMIT_HASH_DPT	0x0002
>> -#define XT_HASHLIMIT_HASH_SIP	0x0004
>> -#define XT_HASHLIMIT_HASH_SPT	0x0008
>> +enum {
>> +	XT_HASHLIMIT_HASH_DIP = 1 << 0,
>> +	XT_HASHLIMIT_HASH_DPT = 1 << 1,
>> +	XT_HASHLIMIT_HASH_SIP = 1 << 2,
>> +	XT_HASHLIMIT_HASH_SPT = 1 << 3,
>> +	XT_HASHLIMIT_INVERT   = 1 << 4,
>> +};
>
>
> Do we really need a full new revision for this? It seems simply adding
> the inversion flag would work fine, old userspace code will always
> have it set to zero.
>
Yes we need a new revision, inversion is not the only thing.

The extra fields "uint8_t srcmask, dstmask" have been added to
struct hashlimit_cfg1, which is embedded in xt_hashlimit_mtinfo1.
So we have an actual struct size change to take care of.
(Yes, before I had the srcmask/dstmask idea, I did inversion-only
using revision 0.)
-
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