]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
src: proto: support DF, LE PHB, VA for DSCP
authorOleksandr Natalenko <oleksandr@natalenko.name>
Mon, 11 Jul 2022 10:47:09 +0000 (12:47 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 1 Aug 2022 13:51:25 +0000 (15:51 +0200)
Add a couple of aliases for well-known DSCP values.

As per RFC 4594, add "df" as an alias of "cs0" with 0x00 value.

As per RFC 5865, add "va" for VOICE-ADMIT with 0x2c value.

As per RFC 8622, add "lephb" for Lower-Effort Per-Hop Behavior with 0x01 value.

tc-cake(8) in diffserv8 mode would benefit from having "lephb" defined since
it corresponds to "Tin 0".

https://www.iana.org/assignments/dscp-registry/dscp-registry.xhtml

Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/proto.c

index a013a00d2c7b12bb8008eeba3c9aa3883b2913e4..905adad312e8f3ce6229df6cf1533c2bcc343974 100644 (file)
@@ -684,7 +684,9 @@ static const struct symbol_table dscp_type_tbl = {
                SYMBOL("cs5",   0x28),
                SYMBOL("cs6",   0x30),
                SYMBOL("cs7",   0x38),
+               SYMBOL("df",    0x00),
                SYMBOL("be",    0x00),
+               SYMBOL("lephb", 0x01),
                SYMBOL("af11",  0x0a),
                SYMBOL("af12",  0x0c),
                SYMBOL("af13",  0x0e),
@@ -697,6 +699,7 @@ static const struct symbol_table dscp_type_tbl = {
                SYMBOL("af41",  0x22),
                SYMBOL("af42",  0x24),
                SYMBOL("af43",  0x26),
+               SYMBOL("va",    0x2c),
                SYMBOL("ef",    0x2e),
                SYMBOL_LIST_END
        },