summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFlorian Westphal2018-09-12 15:19:14 +0200
committerPablo Neira Ayuso2018-09-20 18:08:14 +0200
commit93185c80a5f748620f5652e492f2a1c8d89db593 (patch)
tree71dd131a3c414b202fea3f69f9e786ce107d69b7 /net
parentnetfilter: conntrack: remove l3->l4 mapping information (diff)
downloadkernel-qcow2-linux-93185c80a5f748620f5652e492f2a1c8d89db593.tar.gz
kernel-qcow2-linux-93185c80a5f748620f5652e492f2a1c8d89db593.tar.xz
kernel-qcow2-linux-93185c80a5f748620f5652e492f2a1c8d89db593.zip
netfilter: conntrack: clamp l4proto array size at largers supported protocol
All higher l4proto numbers are handled by the generic tracker; the l4proto lookup function already returns generic one in case the l4proto number exceeds max size. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
index 69d7170cfa8c..40643af7137e 100644
--- a/net/netfilter/nf_conntrack_proto.c
+++ b/net/netfilter/nf_conntrack_proto.c
@@ -43,7 +43,7 @@
extern unsigned int nf_conntrack_net_id;
-static struct nf_conntrack_l4proto __rcu *nf_ct_protos[MAX_NF_CT_PROTO] __read_mostly;
+static struct nf_conntrack_l4proto __rcu *nf_ct_protos[MAX_NF_CT_PROTO + 1] __read_mostly;
static DEFINE_MUTEX(nf_ct_proto_mutex);