diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-06-05 17:02:05 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-06-05 17:34:35 +0200 |
commit | 45cabc474e46c74c27b645582d37a55d5d076051 (patch) | |
tree | 30a2f8247b4a78cf35abbafe95d0f157bb73fa94 /src | |
parent | 5567bfd777182646a3dc7d5a2422a244481fa794 (diff) |
proto: use bitmask_type for comp flags
I think flags should be displayed in hexadecimal and should be handled as a
bitmask.
inet/comp.t: WARNING: line: 15: 'nft add rule ip test-ip4 input comp flags 0x00': 'comp flags 0x00' mismatches 'comp flags 0'
inet/comp.t: WARNING: line: 16: 'nft add rule ip test-ip4 input comp flags != 0x23': 'comp flags != 0x23' mismatches 'comp flags != 35'
inet/comp.t: WARNING: line: 17: 'nft add rule ip test-ip4 input comp flags 0x33-0x45': 'comp flags 0x33-0x45' mismatches 'comp flags 51-69'
inet/comp.t: WARNING: line: 18: 'nft add rule ip test-ip4 input comp flags != 0x33-0x45': 'comp flags != 0x33-0x45' mismatches 'comp flags != 51-69'
inet/comp.t: WARNING: line: 19: 'nft add rule ip test-ip4 input comp flags {0x33, 0x55, 0x67, 0x88}': 'comp flags {0x33, 0x55, 0x67, 0x88}' mismatches 'comp flags { 103, 85, 51, 136}'
inet/comp.t: WARNING: line: 21: 'nft add rule ip test-ip4 input comp flags { 0x33-0x55}': 'comp flags { 0x33-0x55}' mismatches 'comp flags { 51-85}'
rfc3173 says that this is unused for future use though.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/proto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/proto.c b/src/proto.c index 7dc7b3e2..6302016c 100644 --- a/src/proto.c +++ b/src/proto.c @@ -272,7 +272,7 @@ const struct proto_desc proto_comp = { }, .templates = { [COMPHDR_NEXTHDR] = INET_PROTOCOL("nexthdr", struct ip_comp_hdr, nexthdr), - [COMPHDR_FLAGS] = COMPHDR_FIELD("flags", flags), + [COMPHDR_FLAGS] = HDR_TEMPLATE("flags", &bitmask_type, struct ip_comp_hdr, flags), [COMPHDR_CPI] = COMPHDR_FIELD("cpi", cpi), }, }; |