From 5c865489e3a897d7c48578c840946cf86cac2e00 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Tue, 27 Nov 2012 17:10:33 +0100 Subject: [PATCH] Make sure ip_set_max isn't set to IPSET_INVALID_ID --- kernel/net/netfilter/ipset/ip_set_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/net/netfilter/ipset/ip_set_core.c b/kernel/net/netfilter/ipset/ip_set_core.c index bd87ef8..962f124 100644 --- a/kernel/net/netfilter/ipset/ip_set_core.c +++ b/kernel/net/netfilter/ipset/ip_set_core.c @@ -811,7 +811,7 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb, struct ip_set **list, **tmp; ip_set_id_t i = ip_set_max + IP_SET_INC; - if (i < ip_set_max) + if (i < ip_set_max || i == IPSET_INVALID_ID) /* Wraparound */ goto cleanup; -- 2.40.0