]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
exthdr: remove unused proto_key member from struct
authorFlorian Westphal <fw@strlen.de>
Sun, 22 Nov 2020 23:30:17 +0000 (00:30 +0100)
committerFlorian Westphal <fw@strlen.de>
Wed, 9 Dec 2020 17:33:53 +0000 (18:33 +0100)
also, no need for this struct to be in the parser.

Signed-off-by: Florian Westphal <fw@strlen.de>
include/exthdr.h
src/exthdr.c
src/parser_bison.y

index c9a3c211b8c4a810e3ba38bedc75eea9a014b912..1bc756f936491bedad3b0ca9f249cca3c6363b62 100644 (file)
@@ -30,7 +30,6 @@ struct exthdr_desc {
        const char                      *name;
        enum exthdr_desc_id             id;
        uint8_t                         type;
-       int                             proto_key;
        struct proto_hdr_template       templates[10];
 };
 
index 5eb66529b5d7736e6c07574b89cdde8fae9e3e8c..b0243adad1da4bbddfbe4187988577e60093d575 100644 (file)
@@ -409,7 +409,6 @@ const struct exthdr_desc exthdr_rt2 = {
        .name           = "rt2",
        .id             = EXTHDR_DESC_RT2,
        .type           = IPPROTO_ROUTING,
-       .proto_key      = 2,
        .templates      = {
                [RT2HDR_RESERVED]       = {},
                [RT2HDR_ADDR]           = {},
@@ -423,7 +422,6 @@ const struct exthdr_desc exthdr_rt0 = {
        .name           = "rt0",
        .id             = EXTHDR_DESC_RT0,
        .type           = IPPROTO_ROUTING,
-       .proto_key      = 0,
        .templates      = {
                [RT0HDR_RESERVED]       = RT0_FIELD("reserved", ip6r0_reserved, &integer_type),
                [RT0HDR_ADDR_1]         = RT0_FIELD("addr[1]", ip6r0_addr[0], &ip6addr_type),
@@ -439,7 +437,6 @@ const struct exthdr_desc exthdr_rt4 = {
        .name           = "srh",
        .id             = EXTHDR_DESC_SRH,
        .type           = IPPROTO_ROUTING,
-       .proto_key      = 4,
        .templates      = {
                [RT4HDR_LASTENT]        = RT4_FIELD("last-entry", ip6r4_last_entry, &integer_type),
                [RT4HDR_FLAGS]          = RT4_FIELD("flags", ip6r4_flags, &integer_type),
@@ -458,7 +455,6 @@ const struct exthdr_desc exthdr_rt = {
        .name           = "rt",
        .id             = EXTHDR_DESC_RT,
        .type           = IPPROTO_ROUTING,
-       .proto_key      = -1,
 #if 0
        .protocol_key   = RTHDR_TYPE,
        .protocols      = {
index e8aa5bb8eb3d3b705a0cf383e6a477c402585086..08aadaa32a866d61bf77f7636b4cf150bb48dbbd 100644 (file)
@@ -184,7 +184,6 @@ int nft_lex(void *, void *, void *);
        struct handle_spec      handle_spec;
        struct position_spec    position_spec;
        struct prio_spec        prio_spec;
-       const struct exthdr_desc *exthdr_desc;
 }
 
 %token TOKEN_EOF 0             "end of file"