Skip to content

Kill non-default output leftovers

Phil Sutter netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10expr: Fix snprintf buffer length updatessrc/expr/ct.c src/expr/dup.c src/expr/queue.c +1 more+12 -120 replies
2/10obj/ct_expect: Fix snprintf buffer length updatessrc/obj/ct_expect.c+9 -50 replies
3/10obj/ct_timeout: Fix snprintf buffer length updatessrc/obj/ct_timeout.c+5 -50 replies
4/10object: Fix for wrong parameter passed to snprintf callbacksrc/object.c+2 -20 replies
5/10expr: Check output type once and for allinclude/expr_ops.h src/expr.c src/expr/bitwise.c +36 more+102 -6170 replies
6/10expr/data_reg: Drop output_format parameterinclude/data_reg.h src/expr/bitwise.c src/expr/cmp.c +4 more+16 -390 replies
7/10obj: Drop type parameter from snprintf callbackinclude/obj.h src/obj/counter.c src/obj/ct_expect.c +8 more+27 -1760 replies
8/10Drop pointless local variable in snprintf callbackssrc/chain.c src/expr.c src/expr/bitwise.c +34 more+102 -1050 replies
9/10Get rid of single option switch statementssrc/chain.c src/flowtable.c src/gen.c +6 more+31 -1010 replies
10/10ruleset: Eliminate tag and separator helperssrc/ruleset.c+59 -920 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [libnftnl PATCH 00/10] Kill non-default output leftovers

Any other (debug) output format types than the default have been removed for a while now. Assuming no new ones will be introduced anymore, eliminate some of the still existing infrastructure accommodating for them and a few obvious leftovers.

While working on the above, I identified some real issues (albeit only triggered with very small output buffers. They come in patches 1-4, separated by fixing commit.

Instead of proper testing these changes, I went with 'make check' and running nftables' tests/py testsuite which actually compares the libnftnl output against records.

Phil Sutter (10):
expr: Fix snprintf buffer length updates obj/ct_expect: Fix snprintf buffer length updates obj/ct_timeout: Fix snprintf buffer length updates
object: Fix for wrong parameter passed to snprintf callback
expr: Check output type once and for all expr/data_reg: Drop output_format parameter
obj: Drop type parameter from snprintf callback Drop pointless local variable in snprintf callbacks Get rid of single option switch statements
ruleset: Eliminate tag and separator helpers

 include/data_reg.h      |   3 +-
 include/expr_ops.h      |   2 +-
 include/obj.h           |   2 +-
 src/chain.c             |  20 ++--
 src/expr.c              |  10 +-
 src/expr/bitwise.c      |  32 ++-----
 src/expr/byteorder.c    |  22 +----
 src/expr/cmp.c          |  24 +----
 src/expr/connlimit.c    |  20 +---
 src/expr/counter.c      |  20 +---
 src/expr/ct.c           |  23 +----
 src/expr/data_reg.c     |  35 ++-----
 src/expr/dup.c          |  25 +----
 src/expr/dynset.c       |  21 +----
 src/expr/exthdr.c       |  20 +---
 src/expr/fib.c          |  21 +----
 src/expr/flow_offload.c |  20 +---
 src/expr/fwd.c          |  21 +----
 src/expr/hash.c         |  21 +----
 src/expr/immediate.c    |  28 ++----
 src/expr/limit.c        |  20 +---
 src/expr/log.c          |  22 +----
 src/expr/lookup.c       |  21 +----
 src/expr/masq.c         |  20 +---
 src/expr/match.c        |  13 +--
 src/expr/meta.c         |  19 +---
 src/expr/nat.c          |  21 +----
 src/expr/numgen.c       |  21 +----
 src/expr/objref.c       |  20 +---
 src/expr/osf.c          |  22 +----
 src/expr/payload.c      |  32 +++----
 src/expr/queue.c        |  34 ++-----
 src/expr/quota.c        |  20 +---
 src/expr/range.c        |  24 +----
 src/expr/redir.c        |  28 ++----
 src/expr/reject.c       |  20 +---
 src/expr/rt.c           |  19 +---
 src/expr/socket.c       |  19 +---
 src/expr/synproxy.c     |  22 +----
 src/expr/target.c       |  13 +--
 src/expr/tproxy.c       |  19 +---
 src/expr/tunnel.c       |  19 +---
 src/expr/xfrm.c         |  21 +----
 src/flowtable.c         |  21 ++---
 src/gen.c               |  14 +--
 src/obj/counter.c       |  22 +----
 src/obj/ct_expect.c     |  39 +++-----
 src/obj/ct_helper.c     |  22 +----
 src/obj/ct_timeout.c    |  35 ++-----
 src/obj/limit.c         |  23 +----
 src/obj/quota.c         |  23 +----
 src/obj/secmark.c       |  23 +----
 src/obj/synproxy.c      |  22 +----
 src/obj/tunnel.c        |  21 +----
 src/object.c            |  28 ++----
 src/rule.c              |  22 ++---
 src/ruleset.c           | 200 +++++++++++++++-------------------------
 src/set.c               |  26 ++----
 src/set_elem.c          |  27 ++----
 src/table.c             |  16 +---
 60 files changed, 337 insertions(+), 1126 deletions(-)
Signature · 1 line
2.30.1