All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nft 0/8] mptcp subtype option match support
@ 2021-11-19 15:28 Florian Westphal
  2021-11-19 15:28 ` [PATCH nft 1/8] tcpopt: remove KIND keyword Florian Westphal
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Florian Westphal @ 2021-11-19 15:28 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

This series adds 'tcp option mptcp subtype' matching to nft.

Because the subtype is only 4 bits in size the exthdr
delinearization needs a fixup to remove the binop added by the
evaluation step.

One remaining usablility problem is the lack of mnemonics for the
subtype, i.e. something like:

static const struct symbol_table mptcp_subtype_tbl = {
       .base           = BASE_DECIMAL,
       .symbols        = {
               SYMBOL("mp-capable",    0),
               SYMBOL("mp-join",       1),
               SYMBOL("dss",           2),
               SYMBOL("add-addr",      3),
               SYMBOL("remove-addr",   4),
               SYMBOL("mp-prio",       5),
               SYMBOL("mp-fail",       6),
               SYMBOL("mp-fastclose",  7),
               SYMBOL("mp-tcprst",     8),
               SYMBOL_LIST_END
       },

... but this would need addition of yet another data type.

Use of implicit/context-dependent symbol table would
be preferrable, I will look into this next.

Florian Westphal (8):
  tcpopt: remove KIND keyword
  scanner: add tcp flex scope
  parser: split tcp option rules
  tcpopt: add md5sig, fastopen and mptcp options
  tests: py: add test cases for md5sig, fastopen and mptcp mnemonics
  mptcp: add subtype matching
  exthdr: fix tcpopt_find_template to use length after mask adjustment
  tests: py: add tcp subtype match test cases

 doc/payload-expression.txt    |  29 ++++---
 include/parser.h              |   1 +
 include/tcpopt.h              |  13 ++-
 src/exthdr.c                  |  46 +++++-----
 src/parser_bison.y            | 108 +++++++++++++++++------
 src/scanner.l                 |  22 +++--
 src/tcpopt.c                  |  38 +++++++-
 tests/py/any/tcpopt.t         |  21 +++--
 tests/py/any/tcpopt.t.json    | 159 +++++++++++++++++++++++++---------
 tests/py/any/tcpopt.t.payload |  64 ++++++++++----
 10 files changed, 360 insertions(+), 141 deletions(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-12-02 21:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-19 15:28 [PATCH nft 0/8] mptcp subtype option match support Florian Westphal
2021-11-19 15:28 ` [PATCH nft 1/8] tcpopt: remove KIND keyword Florian Westphal
2021-11-19 15:28 ` [PATCH nft 2/8] scanner: add tcp flex scope Florian Westphal
2021-11-19 15:28 ` [PATCH nft 3/8] parser: split tcp option rules Florian Westphal
2021-11-19 15:28 ` [PATCH nft 4/8] tcpopt: add md5sig, fastopen and mptcp options Florian Westphal
2021-11-19 15:28 ` [PATCH nft 5/8] tests: py: add test cases for md5sig, fastopen and mptcp mnemonics Florian Westphal
2021-11-19 15:28 ` [PATCH nft 6/8] mptcp: add subtype matching Florian Westphal
2021-11-19 15:28 ` [PATCH nft 7/8] exthdr: fix tcpopt_find_template to use length after mask adjustment Florian Westphal
2021-11-19 15:28 ` [PATCH nft 8/8] tests: py: add tcp subtype match test cases Florian Westphal
2021-11-23 13:16 ` [PATCH nft 0/8] mptcp subtype option match support Pablo Neira Ayuso
2021-11-23 13:37   ` Florian Westphal
2021-11-30 21:45     ` Pablo Neira Ayuso
2021-12-01 11:30       ` Florian Westphal
2021-12-02 21:42         ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.