Skip to content

Changes in nft byteorder conversions

Alvaro Neira Ayuso netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 of 4 patches 0 repliesNew

3 of 4 patches are in this archive. The cover letter announces 4.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4payload: fix update context with wrong byteordersrc/payload.c+6 -10 replies
3/4src: fix byteorder conversions in range valuessrc/evaluate.c src/netlink_delinearize.c+39 -90 replies
4/4src: fix byteorder conversions in setssrc/evaluate.c src/netlink_delinearize.c+20 -40 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] Changes in nft byteorder conversions

Currently, when we have added a rule, we have done some byteorder conversions in the parser step, evaluation step and linealize step. For that, in some case if we try to add rules, we have done wrong byteorder conversions and we have had matching problems or when we have tried to show the rules that we have added we have showed rules with values in wrong byteorder. We have had too this problems when we have used sets or range.

This series of patches changes the policy for doing byteorder conversions in our rules. We are going to do all the conversions in two steps, parser and evaluation. That changes remove consecutive byteorder conversions, make more easy administrate the byteorder conversions for adding and for showing rules and fix some case that we don't update correctly the context for using values without correctly byteorder conversions. This patches enables to use ranges and sets with the rules without problems.

Comments are welcome.

Alvaro Neira Ayuso (4):
payload: fix update context with wrong byteorder
src: fix byteorder conversions in simple values
src: fix byteorder conversions in range values
src: fix byteorder conversions in sets

 include/gmputil.h         |    1 +
 include/netlink.h         |    3 +--
 src/datatype.c            |    8 ++++++--
 src/evaluate.c            |   48 +++++++++++++++++++++++++++++---------------
 src/expression.c          |    8 ++++++--
 src/gmputil.c             |   15 +++++++++++++-
 src/netlink.c             |   13 ++++++++----
 src/netlink_delinearize.c |   49 +++++++++++++++++++++++++++++++++++++++++----
 src/netlink_linearize.c   |   10 ++++-----
 src/payload.c             |   10 ++++++---
 10 files changed, 126 insertions(+), 39 deletions(-)
Signature · 1 line
1.7.10.4