netfilter: conntrack: Make nf_ct_protos store const l4proto pointers

Needed for newer clang versions.

Change-Id: I7e9de21eb8de5e56404dec43f5e5de31148c9eb0
This commit is contained in:
Thomas Turner committed 2026-01-23 15:34:20 +00:00
1 parent 5d959f7450
commit 5cd8548735
1 file changed
+3 -3
+3 -3
View File
@@ -43,7 +43,7 @@
extern unsigned int nf_conntrack_net_id;
static struct nf_conntrack_l4proto __rcu **nf_ct_protos[NFPROTO_NUMPROTO] __read_mostly;
static const struct nf_conntrack_l4proto __rcu **nf_ct_protos[NFPROTO_NUMPROTO] __read_mostly;
static DEFINE_MUTEX(nf_ct_proto_mutex);
@@ -229,12 +229,12 @@ int nf_ct_l4proto_register_one(const struct nf_conntrack_l4proto *l4proto)
mutex_lock(&nf_ct_proto_mutex);
if (!nf_ct_protos[l4proto->l3proto]) {
/* l3proto may be loaded latter. */
struct nf_conntrack_l4proto __rcu **proto_array;
struct nf_conntrack_l4proto __rcu const **proto_array;
int i;
proto_array =
kmalloc_array(MAX_NF_CT_PROTO,
sizeof(struct nf_conntrack_l4proto *),
sizeof(const struct nf_conntrack_l4proto *),
GFP_KERNEL);
if (proto_array == NULL) {
ret = -ENOMEM;