From 22535a98470a908b879db8fc0354c5f2bbb3984e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 28 Feb 2017 13:31:54 +0100 Subject: src: revisit tcp options support Rework syntax, add tokens so we can extend the grammar more easily. This has triggered several syntax changes with regards to the original patch, specifically: tcp option sack0 left 1 There is no space between sack and the block number anymore, no more offset field, now they are a single field. Just like we do with rt, rt0 and rt2. This simplifies our grammar and that is good since it makes our life easier when extending it later on to accomodate new features. I have also renamed sack_permitted to sack-permitted. I couldn't find any option using underscore so far, so let's keep it consistent with what we have. Signed-off-by: Pablo Neira Ayuso --- doc/nft.xml | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/nft.xml b/doc/nft.xml index 49664c42..990b9368 100644 --- a/doc/nft.xml +++ b/doc/nft.xml @@ -2525,11 +2525,14 @@ inet filter meta nfproto ipv6 output rt nexthop fd00::1 noop maxseg window - sack_permitted + sack-permitted sack + sack0 + sack1 + sack2 + sack3 timestamp - offset tcp_option_field @@ -2604,13 +2607,33 @@ inet filter meta nfproto ipv6 output rt nexthop fd00::1 kind, length, count - sack_permitted + sack-permitted TCP SACK permitted kind, length sack - TCP Selective Acknowledgement + TCP Selective Acknowledgement (alias of block 0) + kind, length, left, right + + + sack0 + TCP Selective Acknowledgement (block 0) + kind, length, left, right + + + sack1 + TCP Selective Acknowledgement (block 1) + kind, length, left, right + + + sack2 + TCP Selective Acknowledgement (block 2) + kind, length, left, right + + + sack3 + TCP Selective Acknowledgement (block 3) kind, length, left, right @@ -2623,17 +2646,11 @@ inet filter meta nfproto ipv6 output rt nexthop fd00::1 - - The offset is only used for the SACK TCP option fields left and right. - For all non-SACK TCP options it is always zero. - Offsets which equals to zero can be omitted. - - finding TCP options -filter input tcp option sack_permitted kind 1 counter +filter input tcp option sack-permitted kind 1 counter -- cgit v1.2.3