From: Thomas Haller Date: Wed, 20 Sep 2023 14:26:10 +0000 (+0200) Subject: proto: add missing proto_definitions for PROTO_DESC_GENEVE X-Git-Tag: v1.0.9~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8172814e4cd5e1f08d4d2e8b7303fbe2ea929e8e;p=thirdparty%2Fnftables.git proto: add missing proto_definitions for PROTO_DESC_GENEVE 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 Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/proto.c b/src/proto.c index b5cb0106..735e37f8 100644 --- a/src/proto.c +++ b/src/proto.c @@ -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, };