Chunks are SCTP header extensions similar in implementation to IPv6 extension headers or TCP options. Reusing exthdr expression to find and extract field values from them is therefore pretty straightforward. For now, this supports extracting data from chunks at a fixed offset (and length) only - chunks themselves are an extensible data structure; in order to make all fields available, a nested extension search is needed.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -813,11 +813,13 @@ enum nft_exthdr_flags { · 812 unmodified lines | |||
| 813 | * @NFT_EXTHDR_OP_IPV6: match against ipv6 extension headers | 813 | * @NFT_EXTHDR_OP_IPV6: match against ipv6 extension headers |
| 814 | * @NFT_EXTHDR_OP_TCP: match against tcp options | 814 | * @NFT_EXTHDR_OP_TCP: match against tcp options |
| 815 | * @NFT_EXTHDR_OP_IPV4: match against ipv4 options | 815 | * @NFT_EXTHDR_OP_IPV4: match against ipv4 options |
| 816 | * @NFT_EXTHDR_OP_SCTP: match against sctp chunks | ||
| 816 | */ | 817 | */ |
| 817 | enum nft_exthdr_op { | 818 | enum nft_exthdr_op { |
| 818 | NFT_EXTHDR_OP_IPV6, | 819 | NFT_EXTHDR_OP_IPV6, |
| 819 | NFT_EXTHDR_OP_TCPOPT, | 820 | NFT_EXTHDR_OP_TCPOPT, |
| 820 | NFT_EXTHDR_OP_IPV4, | 821 | NFT_EXTHDR_OP_IPV4, |
| 822 | NFT_EXTHDR_OP_SCTP, | ||
| 821 | __NFT_EXTHDR_OP_MAX | 823 | __NFT_EXTHDR_OP_MAX |
| 822 | }; | 824 | }; |
| 823 | #define NFT_EXTHDR_OP_MAX (__NFT_EXTHDR_OP_MAX - 1) | 825 | #define NFT_EXTHDR_OP_MAX (__NFT_EXTHDR_OP_MAX - 1) |