Skip to content

libnftables: minor cleanups initalizing nf_sock instance of nft_ctx

Thomas Haller netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4libnftables: always initialize netlink socket in nft_ctx_new()src/libnftables.c+1 -20 replies
2/4libnftables: drop unused argument nf_sock from nft_netlink()src/libnftables.c+3 -40 replies
3/4libnftables: inline creation of nf_sock in nft_ctx_new()src/libnftables.c+1 -60 replies
4/4libnftables: drop check for nf_sock in nft_ctx_free()src/libnftables.c+1 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [nft PATCH 0/4] libnftables: minor cleanups initalizing nf_sock instance of nft_ctx

There is some unnecessary or redundant code in "src/libnftables.c". Clean up.

This was motivated by an attempt to add a new flag for nft_ctx_new(), beside NFT_CTX_DEFAULT. The current "if (flags == NFT_CTX_DEFAULT)" check is an odd usage for flags (because we would want that behavior for all flags).

Thomas Haller (4):
libnftables: always initialize netlink socket in nft_ctx_new()
libnftables: drop unused argument nf_sock from nft_netlink()
libnftables: inline creation of nf_sock in nft_ctx_new()
libnftables: drop check for nf_sock in nft_ctx_free()

 src/libnftables.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)
Signature · 1 line
2.41.0