mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 00:53:40 +00:00
netfilter: ipset: Validate the set family and not the set type family at swapping
This closes netfilter bugzilla #843, reported by Quentin Armitage. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
This commit is contained in:
parent
0f1799ba1a
commit
169faa2e19
@ -1052,7 +1052,7 @@ ip_set_swap(struct sock *ctnl, struct sk_buff *skb,
|
||||
* Not an artificial restriction anymore, as we must prevent
|
||||
* possible loops created by swapping in setlist type of sets. */
|
||||
if (!(from->type->features == to->type->features &&
|
||||
from->type->family == to->type->family))
|
||||
from->family == to->family))
|
||||
return -IPSET_ERR_TYPE_MISMATCH;
|
||||
|
||||
strncpy(from_name, from->name, IPSET_MAXNAMELEN);
|
||||
|
Loading…
Reference in New Issue
Block a user