netfilter: ipset: Fix return code for destroy when sets are in use
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Wed, 1 Jun 2011 21:35:48 +0000 (23:35 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 5 Jun 2011 23:35:15 +0000 (01:35 +0200)
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipset/ip_set_core.c

index 8041befc65553588eda40e4a41e6b9e440a21367..42aa64b6b0b1b6c7ae87dbe7831776ea2d345366 100644 (file)
@@ -767,7 +767,7 @@ ip_set_destroy(struct sock *ctnl, struct sk_buff *skb,
        if (!attr[IPSET_ATTR_SETNAME]) {
                for (i = 0; i < ip_set_max; i++) {
                        if (ip_set_list[i] != NULL && ip_set_list[i]->ref) {
-                               ret = IPSET_ERR_BUSY;
+                               ret = -IPSET_ERR_BUSY;
                                goto out;
                        }
                }