netfilter: ipset: bitmap:ip,mac: fix listing with timeout
[cascardo/linux.git] / net / netfilter / ipset / ip_set_bitmap_ipmac.c
index 0f92dc2..d7df6ac 100644 (file)
@@ -339,7 +339,11 @@ bitmap_ipmac_tlist(const struct ip_set *set,
 nla_put_failure:
        nla_nest_cancel(skb, nested);
        ipset_nest_end(skb, atd);
-       return -EMSGSIZE;
+       if (unlikely(id == first)) {
+               cb->args[2] = 0;
+               return -EMSGSIZE;
+       }
+       return 0;
 }
 
 static int