From 8172814e4cd5e1f08d4d2e8b7303fbe2ea929e8e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 20 Sep 2023 16:26:10 +0200 Subject: 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 --- src/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/proto.c') 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, }; -- cgit v1.2.3