Re: [PATCH] src: extend nft to list set handle and delete set via set handle

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

 



On Sun, Jan 14, 2018 at 09:48:46PM +0530, Harsha Sharma wrote:
> Print 'handle' attribute in sets when listing via '-a' option and
> delete sets via their unique set handles listed with '-a' option.
> For e.g.
> 
> nft delete set [<family>] <table-name> [handle <handle>]
> 
> Signed-off-by: Harsha Sharma <harshasharmaiitr@xxxxxxxxx>
> ---
>  include/linux/netfilter/nf_tables.h |  2 ++
>  src/netlink.c                       |  4 ++++
>  src/parser_bison.y                  | 16 ++++++++++++++--
>  src/rule.c                          |  6 +++++-
>  4 files changed, 25 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h
> index 6db9130..a4c88ff 100644
> --- a/include/linux/netfilter/nf_tables.h
> +++ b/include/linux/netfilter/nf_tables.h
> @@ -299,6 +299,7 @@ enum nft_set_desc_attributes {
>   *
>   * @NFTA_SET_TABLE: table name (NLA_STRING)
>   * @NFTA_SET_NAME: set name (NLA_STRING)
> + * @NFTA_SET_HANDLE: numeric handle of the set (NLA_U64)
>   * @NFTA_SET_FLAGS: bitmask of enum nft_set_flags (NLA_U32)
>   * @NFTA_SET_KEY_TYPE: key data type, informational purpose only (NLA_U32)
>   * @NFTA_SET_KEY_LEN: key data length (NLA_U32)
> @@ -316,6 +317,7 @@ enum nft_set_attributes {
>  	NFTA_SET_UNSPEC,
>  	NFTA_SET_TABLE,
>  	NFTA_SET_NAME,
> +	NFTA_SET_HANDLE,

Please, add attributes always right at the end of the list. Otherwise,
this breaks binary compatibility.
--
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