[Bug 1214] Allow limit to use any value for time unit

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Sat Jan 20 14:09:29 CET 2018


https://bugzilla.netfilter.org/show_bug.cgi?id=1214

--- Comment #8 from Pablo Neira Ayuso <pablo at netfilter.org> ---
(In reply to Pablo Neira Ayuso from comment #7)
> (In reply to Pablo Neira Ayuso from comment #6)
> > (In reply to Cyril from comment #5)
> > > Created attachment 519 [details]
> > > Fixed patch with correct listing when calling nft list
> > > 
> > > This should solve this bug.
> > 
> > Thanks Cyril.
> > 
> > A couple of comments:
> > 
> > static char buffer[20]; 
> > 
> > Can we replace 20 by something more meaningful?
> > 
> > strlen("18446744073709551616");
> 
> Or add a comment
> 
> /* maximum string length for 64-bit value. */
> static char buffer[20]; 
> 
> So we remember about the 20 char magic number, this actually needs to be 21
> since we need to store \0.
> 
> BTW, would you also add tests to nftables/tests/py/any/limit.t
> 
> You will also need to update tests/py/any/limit.t.payload to include what
> nft --debug=netlink generates.
> 
> Thanks !

Regarding syntax, I wonder if it is worth to express this including time unit,
ie.

    | NUM SECONDS

So we leave room to support things like "1 packet every 3 weeks" later on.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20180120/16e03c98/attachment.html>


More information about the netfilter-buglog mailing list