mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
netfilter: ipset: "Directory not empty" error message
When an entry flagged with "nomatch" was tested by ipset, it returned the error message "Kernel error received: Directory not empty" instead of "<element> is NOT in set <setname>" (reported by John Brendler). The internal error code was not properly transformed before returning to userspace, fixed. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
This commit is contained in:
parent
cf1c4a094f
commit
dd82088dab
@ -1470,7 +1470,8 @@ ip_set_utest(struct sock *ctnl, struct sk_buff *skb,
|
|||||||
if (ret == -EAGAIN)
|
if (ret == -EAGAIN)
|
||||||
ret = 1;
|
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 */
|
/* Get headed data of a set */
|
||||||
|
Loading…
Reference in New Issue
Block a user