diff options
author | Phil Sutter <phil@nwl.cc> | 2020-12-02 13:37:06 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-12-09 10:27:31 +0100 |
commit | 4bcbc8e11a2764f4537dc405962f83cd072cccfe (patch) | |
tree | 70e064cdf529e3f6649e1af66d416d2686161e41 /extensions/libip6t_ah.man | |
parent | 93d0c97e8b6713f51ba679e01a1338d4f9076e7c (diff) |
extensions: dccp: Fix for DCCP type 'INVALID'
Support for matching on invalid DCCP type field values was pretty
broken: While RFC4340 declares any type value from 10 to 15 invalid, the
extension's type name 'INVALID' mapped to type value 10 only. Fix this
by introduction of INVALID_OTHER_TYPE_MASK which has the remaining
invalid type's bits set and apply it if bit 10 is set after parsing the
type list. When printing, stop searching type names after printing
'INVALID' - unless numeric output was requested. The latter prints all
actual type values. Since parsing types in numeric form is not
supported, changing the output should not break existing scripts.
When translating into nftables syntax, the code returned prematurely if
'INVALID' was among the list of types - thereby emitting invalid syntax.
Instead print a real match for invalid types by use of a range
expression.
While being at it, fix syntax of translator output: If only
'--dccp-types' was translated, the output contained an extra 'dccp'. On
the other hand, if '--sport' and '--dport' was present, a required
'dccp' between the translations of both was missing.
Fixes: e40b11d7ef827 ("add support for new 'dccp' protocol match")
Fixes: c94a998724143 ("extensions: libxt_dccp: Add translation to nft")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/libip6t_ah.man')
0 files changed, 0 insertions, 0 deletions