Skip to content

mptcp subtype option match support

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8tcpopt: remove KIND keyworddoc/payload-expression.txt src/parser_bison.y src/scanner.l +3 more+56 -830 replies
2/8scanner: add tcp flex scopeinclude/parser.h src/parser_bison.y src/scanner.l+18 -110 replies
3/8parser: split tcp option rulessrc/parser_bison.y+61 -190 replies
4/8tcpopt: add md5sig, fastopen and mptcp optionsinclude/tcpopt.h src/parser_bison.y src/scanner.l +1 more+49 -20 replies
5/8tests: py: add test cases for md5sig, fastopen and mptcp mnemonicstests/py/any/tcpopt.t tests/py/any/tcpopt.t.json tests/py/any/tcpopt.t.payload+63 -00 replies
6/8mptcp: add subtype matchinginclude/tcpopt.h src/parser_bison.y src/scanner.l +1 more+13 -10 replies
7/8exthdr: fix tcpopt_find_template to use length after mask adjustmentinclude/tcpopt.h src/exthdr.c src/tcpopt.c+27 -300 replies
8/8tests: py: add tcp subtype match test casestests/py/any/tcpopt.t tests/py/any/tcpopt.t.json tests/py/any/tcpopt.t.payload+78 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH nft 0/8] mptcp subtype option match support

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(-)
Signature · 1 line
2.32.0