Re: [PATCH 1/2] libnftables.map: export new nft_ctx_{get,set}_optimize API

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

 




> On 24 Feb 2022, at 19:45, Sam James <sam@xxxxxxxxxx> wrote:
> 
> Without this, we're not explicitly saying this is part of the public
> API.
> 
> This new API was added in 1.0.2 and is used by e.g. the main
> nft binary. Noticed when fixing the version-script option
> (separate patch) which picked up this problem when .map
> was missing symbols (related to when symbol visibility
> options get set).
> 

Actually, I'm wondering if we need way more?

`abidiff` yields (between 1.0.1 and 1.0.2 for me):
```
 * 22 Removed functions:
 *
 *   [D] 'function int nft_ctx_add_include_path(nft_ctx*, const char*)'    {nft_ctx_add_include_path@@LIBNFTABLES_1}
 *   [D] 'function int nft_ctx_add_var(nft_ctx*, const char*)'    {nft_ctx_add_var@@LIBNFTABLES_2}
 *   [D] 'function int nft_ctx_buffer_error(nft_ctx*)'    {nft_ctx_buffer_error@@LIBNFTABLES_1}
 *   [D] 'function int nft_ctx_buffer_output(nft_ctx*)'    {nft_ctx_buffer_output@@LIBNFTABLES_1}
 *   [D] 'function void nft_ctx_clear_include_paths(nft_ctx*)'    {nft_ctx_clear_include_paths@@LIBNFTABLES_1}
 *   [D] 'function void nft_ctx_clear_vars(nft_ctx*)'    {nft_ctx_clear_vars@@LIBNFTABLES_2}
 *   [D] 'function void nft_ctx_free(nft_ctx*)'    {nft_ctx_free@@LIBNFTABLES_1}
 *   [D] 'function bool nft_ctx_get_dry_run(nft_ctx*)'    {nft_ctx_get_dry_run@@LIBNFTABLES_1}
 *   [D] 'function const char* nft_ctx_get_error_buffer(nft_ctx*)'    {nft_ctx_get_error_buffer@@LIBNFTABLES_1}
 *   [D] 'function const char* nft_ctx_get_output_buffer(nft_ctx*)'    {nft_ctx_get_output_buffer@@LIBNFTABLES_1}
 *   [D] 'function nft_ctx* nft_ctx_new(uint32_t)'    {nft_ctx_new@@LIBNFTABLES_1}
 *   [D] 'function unsigned int nft_ctx_output_get_debug(nft_ctx*)'    {nft_ctx_output_get_debug@@LIBNFTABLES_1}
 *   [D] 'function unsigned int nft_ctx_output_get_flags(nft_ctx*)'    {nft_ctx_output_get_flags@@LIBNFTABLES_1}
 *   [D] 'function void nft_ctx_output_set_debug(nft_ctx*, unsigned int)'    {nft_ctx_output_set_debug@@LIBNFTABLES_1}
 *   [D] 'function void nft_ctx_output_set_flags(nft_ctx*, unsigned int)'    {nft_ctx_output_set_flags@@LIBNFTABLES_1}
 *   [D] 'function void nft_ctx_set_dry_run(nft_ctx*, bool)'    {nft_ctx_set_dry_run@@LIBNFTABLES_1}
 *   [D] 'function FILE* nft_ctx_set_error(nft_ctx*, FILE*)'    {nft_ctx_set_error@@LIBNFTABLES_1}
 *   [D] 'function FILE* nft_ctx_set_output(nft_ctx*, FILE*)'    {nft_ctx_set_output@@LIBNFTABLES_1}
 *   [D] 'function int nft_ctx_unbuffer_error(nft_ctx*)'    {nft_ctx_unbuffer_error@@LIBNFTABLES_1}
 *   [D] 'function int nft_ctx_unbuffer_output(nft_ctx*)'    {nft_ctx_unbuffer_output@@LIBNFTABLES_1}
 *   [D] 'function int nft_run_cmd_from_buffer(nft_ctx*, const char*)'    {nft_run_cmd_from_buffer@@LIBNFTABLES_1}
 *   [D] 'function int nft_run_cmd_from_filename(nft_ctx*, const char*)'    {nft_run_cmd_from_filename@@LIBNFTABLES_1}
```

AFAIK none of these are internal so we I think want the whole context API.

> Signed-off-by: Sam James <sam@xxxxxxxxxx>
> ---
> src/libnftables.map | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/src/libnftables.map b/src/libnftables.map
> index a511dd78..f8cf05dc 100644
> --- a/src/libnftables.map
> +++ b/src/libnftables.map
> @@ -32,4 +32,6 @@ LIBNFTABLES_2 {
> LIBNFTABLES_3 {
>   nft_set_optimize;
>   nft_get_optimize;
> +  nft_ctx_set_optimize;
> +  nft_ctx_get_optimize;
> } LIBNFTABLES_2;
> --
> 2.35.1
> 

Best,
sam

Attachment: signature.asc
Description: Message signed with OpenPGP


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

  Powered by Linux