diff options
author | Patrick McHardy <kaber@trash.net> | 2008-04-14 05:15:45 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-04-14 05:15:45 -0400 |
commit | 544473c1664f3a688be949ac078bdee6f4afeef1 (patch) | |
tree | 019b6a5088f8fe99928464d9530268d1de02924a /include/net | |
parent | fa913ddf6372b20b23061996150d38f639488d42 (diff) |
[NETFILTER]: {ip,ip6,arp}_tables: return EAGAIN for invalid SO_GET_ENTRIES size
Rule dumping is performed in two steps: first userspace gets the
ruleset size using getsockopt(SO_GET_INFO) and allocates memory,
then it calls getsockopt(SO_GET_ENTRIES) to actually dump the
ruleset. When another process changes the ruleset in between the
sizes from the first getsockopt call doesn't match anymore and
the kernel aborts. Unfortunately it returns EAGAIN, as for multiple
other possible errors, so userspace can't distinguish this case
from real errors.
Return EAGAIN so userspace can retry the operation.
Fixes (with current iptables SVN version) netfilter bugzilla #104.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions