Re: [PATCH nft RFC] datatype: add time type parser and adapt output

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

 



Patrick McHardy <kaber@xxxxxxxxx> schrieb:
>On Thu, Jan 16, 2014 at 10:01:02PM +0100, Pablo Neira Ayuso wrote:
>> This patch allows to specify a string to indicate the time, eg.
>> 
>> nft add rule filter output ct expiration \"1d2h3m4s\" counter
>> 
>> Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
>> ---
>> An alternative to this patch is to use seconds as input/output, that
>only
>> needs a smaller patch to fix time_type_print().
>
>I think this is a much more natural way to specify relative times.

Sorry, just realized that this was very much imprecise, I meant your patch oft course.

>
>>  include/utils.h |    4 ++
>>  src/datatype.c  |  133
>++++++++++++++++++++++++++++++++++++++++++++++++-------
>>  2 files changed, 121 insertions(+), 16 deletions(-)
>> 
>> diff --git a/include/utils.h b/include/utils.h
>> index 854986f..f23f8e6 100644
>> --- a/include/utils.h
>> +++ b/include/utils.h
>> @@ -62,6 +62,10 @@
>>  	(void) (&_max1 == &_max2);		\
>>  	_max1 > _max2 ? _max1 : _max2; })
>>  
>> +#ifndef ARRAY_SIZE
>> +#define ARRAY_SIZE(a) (int)(sizeof(a)/sizeof((a)[0]))
>> +#endif
>
>We have array_size().
>--
>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


-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
--
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