doc: add MPTCP subtypes documentation to man page
PATCH 1/1 doc: add MPTCP subtypes documentation to man page
In addition, document the limitation when there are multiple MPTCP options.
--- doc/payload-expression.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
doc/payload-expression.txt +38 -0
@@ -805,6 +805,32 @@ TCP option matching also supports raw expression syntax to access arbitrary opti [verse] *tcp option* *@*'number'*,*'offset'*,*'length' +.MPTCP subtypes +[options="header"] +|============================ +|Keyword| Description +|mp-capable| +Multipath capable +|mp-join| +Join connection +|dss| +Data sequence signal +|add-addr| +Add address +|remove-addr| +Remove address +|mp-prio| +Change subflow priority +|mp-fail| +Fallback to single-path TCP +|mp-fastclose| +Fast close +|mp-tcprst| +Subflow reset +|============================ + +Data types can be queried with 'nft describe tcp option mptcp subtype'. + .IP Options [options="header"] |==================
@@ -833,6 +859,18 @@ filter input tcp option sack-perm exists counter filter input tcp option maxseg size lt 536 -------------------- +.matching MPTCP suboptions +-------------------- +filter input tcp option mptcp subtype mp-join drop +-------------------- + +[NOTE] +==================== +Netfilter currently evaluates only the first MPTCP option found in the TCP +header. If a packet contains multiple MPTCP options, a rule attempting to match +the second option will never match. +==================== + .matching IPv6 exthdr --------------------- ip6 filter input frag more-fragments 1 counter
Signature · 1 line
2.55.0
Hi Fernando,
Quoted 2 lines · Fernando Fernandez Mancera
In addition, document the limitation when there are multiple MPTCP options.
Thank you for this patch!
Quoted 4 lines
doc/payload-expression.txt +0
-0
(...)
Quoted 4 lines
doc/payload-expression.txt +0
-0@@ -833,6 +859,18 @@ filter input tcp option sack-perm exists counter filter input tcp option maxseg size lt 536 --------------------
doc/payload-expression.txt filter input tcp option sack-perm exists counter · line 871
Quoted 10 lines
doc/payload-expression.txt +10
-0+.matching MPTCP suboptions +-------------------- +filter input tcp option mptcp subtype mp-join drop +-------------------- + +[NOTE] +==================== +Netfilter currently evaluates only the first MPTCP option found in the TCP +header. If a packet contains multiple MPTCP options, a rule attempting to match +the second option will never match.
Would it be interesting to give an example? e.g. a rule attempting to match 'remove-addr', 'mp-prio' and 'mp-fail' (and 'mp-tcprst' in some cases) are not going to catch anything when the traffic is emitted by the current Linux kernel stack.
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Quoted 19 lines · Matthieu Baerts
Hi Fernando,
Quoted 2 lines · Fernando Fernandez Mancera
In addition, document the limitation when there are multiple MPTCP options.
Thank you for this patch!
Quoted 4 lines
doc/payload-expression.txt +0
-0(...)
Quoted 4 lines
doc/payload-expression.txt +0
-0@@ -833,6 +859,18 @@ filter input tcp option sack-perm exists counter filter input tcp option maxseg size lt 536 --------------------
Quoted 16 lines
doc/payload-expression.txt filter input tcp option sack-perm exists counter · line 871
Quoted 10 lines
doc/payload-expression.txt +10
-0+.matching MPTCP suboptions +-------------------- +filter input tcp option mptcp subtype mp-join drop +-------------------- + +[NOTE] +==================== +Netfilter currently evaluates only the first MPTCP option found in the TCP +header. If a packet contains multiple MPTCP options, a rule attempting to match +the second option will never match.Would it be interesting to give an example? e.g. a rule attempting to match 'remove-addr', 'mp-prio' and 'mp-fail' (and 'mp-tcprst' in some cases) are not going to catch anything when the traffic is emitted by the current Linux kernel stack.
Hi Matthieu,
could you provide a good one? Ideally the documentation should be as simple as possible. I thought about adding the rule you asked about initially.. but I realized that simply describing the issue was better IMHO.
Thanks,
Fernando.
Quoted 2 lines
Cheers,
Matt
Hi Fernando,
Quoted 30 lines · Fernando Fernandez Mancera
Quoted 20 lines · Matthieu Baerts
Quoted 4 lines · Fernando Fernandez Mancera
doc/payload-expression.txt +0
-0(...)
Quoted 12 lines
doc/payload-expression.txt +0
-0@@ -833,6 +859,18 @@ filter input tcp option sack-perm exists counterfilter input tcp option maxseg size lt 536
--------------------
+.matching MPTCP suboptions
+--------------------doc/payload-expression.txt +6
-0+filter input tcp option mptcp subtype mp-join drop +-------------------- + +[NOTE] +==================== +Netfilter currently evaluates only the first MPTCP option found inthe TCP
Quoted 8 lines
Quoted 3 lines
+header. If a packet contains multiple MPTCP options, a rule attempting to match
+the second option will never match.Would it be interesting to give an example? e.g. a rule attempting to match 'remove-addr', 'mp-prio' and 'mp-fail' (and 'mp-tcprst' in some cases) are not going to catch anything when the traffic is emitted by the current Linux kernel stack.
Quoted 4 lines
could you provide a good one? Ideally the documentation should be as simple as possible. I thought about adding the rule you asked about initially.. but I realized that simply describing the issue was better IMHO.
What about something like this?
Netfilter currently evaluates only the first MPTCP option found in the TCP header. If a packet contains multiple MPTCP options, a rule attempting to match the second option will never match. Having multiple MPTCP options in the same packet is valid, e.g. the Linux MPTCP stack inserts 'remove-addr', 'mp-prio' and 'mp-fail' after an MPTCP 'dss' option ; 'mp-tcprst' can also be inserted after an 'mp- fastclose'.
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Quoted 39 lines · Matthieu Baerts
Hi Fernando,
Quoted 30 lines · Fernando Fernandez Mancera
Quoted 20 lines · Matthieu Baerts
Quoted 4 lines · Fernando Fernandez Mancera
doc/payload-expression.txt +0
-0(...)
Quoted 12 lines
doc/payload-expression.txt +7
-0@@ -833,6 +859,18 @@ filter input tcp option sack-perm exists counter filter input tcp option maxseg size lt 536 -------------------- +.matching MPTCP suboptions +-------------------- +filter input tcp option mptcp subtype mp-join drop +-------------------- + +[NOTE] +==================== +Netfilter currently evaluates only the first MPTCP option found inthe TCP
Quoted 8 lines
Quoted 3 lines
+header. If a packet contains multiple MPTCP options, a rule attempting to match
+the second option will never match.Would it be interesting to give an example? e.g. a rule attempting to match 'remove-addr', 'mp-prio' and 'mp-fail' (and 'mp-tcprst' in some cases) are not going to catch anything when the traffic is emitted by the current Linux kernel stack.
Quoted 4 lines
could you provide a good one? Ideally the documentation should be as simple as possible. I thought about adding the rule you asked about initially.. but I realized that simply describing the issue was better IMHO.
What about something like this?
Quoted 8 lines
Netfilter currently evaluates only the first MPTCP option found in the TCP header. If a packet contains multiple MPTCP options, a rule attempting to match the second option will never match. Having multiple MPTCP options in the same packet is valid, e.g. the Linux MPTCP stack inserts 'remove-addr', 'mp-prio' and 'mp-fail' after an MPTCP 'dss' option ; 'mp-tcprst' can also be inserted after an 'mp- fastclose'.
Yep, that works! Will include in the v2, thanks!
Quoted 2 lines
Cheers,
Matt