]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
proto: add missing proto_definitions for PROTO_DESC_GENEVE
authorThomas Haller <thaller@redhat.com>
Wed, 20 Sep 2023 14:26:10 +0000 (16:26 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 20 Sep 2023 16:14:21 +0000 (18:14 +0200)
While at it, make proto_definitions const. For global variables, this
allows the linker to mark the memory as read only. It's just good to do
by default.

Fixes: 156d22654003 ("src: add geneve matching support")
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/proto.c

index b5cb0106dd7ba570ae5356eb44c4ffffe1f4a6b9..735e37f850c50d1df478a39c79346beb013faf1b 100644 (file)
@@ -1281,7 +1281,7 @@ const struct proto_desc proto_netdev = {
        },
 };
 
-static const struct proto_desc *proto_definitions[PROTO_DESC_MAX + 1] = {
+static const struct proto_desc *const proto_definitions[PROTO_DESC_MAX + 1] = {
        [PROTO_DESC_AH]         = &proto_ah,
        [PROTO_DESC_ESP]        = &proto_esp,
        [PROTO_DESC_COMP]       = &proto_comp,
@@ -1300,6 +1300,7 @@ static const struct proto_desc *proto_definitions[PROTO_DESC_MAX + 1] = {
        [PROTO_DESC_VLAN]       = &proto_vlan,
        [PROTO_DESC_ETHER]      = &proto_eth,
        [PROTO_DESC_VXLAN]      = &proto_vxlan,
+       [PROTO_DESC_GENEVE]     = &proto_geneve,
        [PROTO_DESC_GRE]        = &proto_gre,
        [PROTO_DESC_GRETAP]     = &proto_gretap,
 };