Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b86c761f authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'master' of git://1984.lsi.us.es/nf



Pablo Neira Ayuso says:

====================
The following patchset contains two bugfixes for netfilter/ipset via
Jozsef Kadlecsik, they are:

* Fix timeout corruption if sets are resized, by Josh Hunt.

* Fix bogus error report if the flag nomatch is set, from Jozsef.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 3647d345 dd82088d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -854,6 +854,8 @@ type_pf_tresize(struct ip_set *set, bool retried)
retry:
	ret = 0;
	htable_bits++;
	pr_debug("attempt to resize set %s from %u to %u, t %p\n",
		 set->name, orig->htable_bits, htable_bits, orig);
	if (!htable_bits) {
		/* In case we have plenty of memory :-) */
		pr_warning("Cannot increase the hashsize of set %s further\n",
@@ -873,7 +875,7 @@ type_pf_tresize(struct ip_set *set, bool retried)
			data = ahash_tdata(n, j);
			m = hbucket(t, HKEY(data, h->initval, htable_bits));
			ret = type_pf_elem_tadd(m, data, AHASH_MAX(h), 0,
						type_pf_data_timeout(data));
						ip_set_timeout_get(type_pf_data_timeout(data)));
			if (ret < 0) {
				read_unlock_bh(&set->lock);
				ahash_destroy(t);
+2 −1
Original line number Diff line number Diff line
@@ -1470,7 +1470,8 @@ ip_set_utest(struct sock *ctnl, struct sk_buff *skb,
	if (ret == -EAGAIN)
		ret = 1;

	return ret < 0 ? ret : ret > 0 ? 0 : -IPSET_ERR_EXIST;
	return (ret < 0 && ret != -ENOTEMPTY) ? ret :
		ret > 0 ? 0 : -IPSET_ERR_EXIST;
}

/* Get headed data of a set */