Re: [libnftnl PATCH v3] Introduce struct nftnl_str_array

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

 



On Tue, Oct 29, 2024 at 03:24:12PM +0100, Pablo Neira Ayuso wrote:
> On Tue, Oct 29, 2024 at 02:16:56PM +0100, Phil Sutter wrote:
> > This data structure holds an array of allocated strings for use in
> > nftnl_chain and nftnl_flowtable structs. For convenience, implement
> > functions to clear, populate and iterate over contents.
> > 
> > While at it, extend chain and flowtable tests to cover these attributes,
> > too.
> > Signed-off-by: Phil Sutter <phil@xxxxxx>
> > ---
> > Changes since v2:
> > - Add also missing include/str_array.h
> > - Drop left-over chunk from src/utils.c
> > - No need to zero sa->array in nftnl_str_array_clear(), sa->len being
> >   zero should sufficiently prevent access
> > ---
> >  include/internal.h         |  1 +
> >  include/str_array.h        | 22 +++++++++
> >  src/Makefile.am            |  1 +
> >  src/chain.c                | 90 ++++++------------------------------
> >  src/flowtable.c            | 94 ++++++--------------------------------
> >  src/str_array.c            | 68 +++++++++++++++++++++++++++
> >  tests/nft-chain-test.c     | 37 ++++++++++++++-
> >  tests/nft-flowtable-test.c | 21 +++++++++
> >  8 files changed, 175 insertions(+), 159 deletions(-)
> >  create mode 100644 include/str_array.h
> >  create mode 100644 src/str_array.c
> 
> One more nitpick: Missing update of include/Makefile.am breaks
> `make distcheck` for libnftnl.

Fixed in v4, thanks for your patience.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux