summaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-17 13:41:40 -0800
committerDavid S. Miller <davem@davemloft.net>2010-02-17 13:41:40 -0800
commit069c474e88bb7753183f1eadbd7786c27888c8e3 (patch)
tree09b0385d34a2d0b302b1f61a2783bfcdc510732f /net/key
parent08326dbe7b5825295ec3711eec53b093549749e5 (diff)
downloadlinux-069c474e88bb7753183f1eadbd7786c27888c8e3.tar.gz
linux-069c474e88bb7753183f1eadbd7786c27888c8e3.tar.bz2
linux-069c474e88bb7753183f1eadbd7786c27888c8e3.zip
xfrm: Revert false event eliding commits.
As reported by Alexey Dobriyan: -------------------- setkey now takes several seconds to run this simple script and it spits "recv: Resource temporarily unavailable" messages. #!/usr/sbin/setkey -f flush; spdflush; add A B ipcomp 44 -m tunnel -C deflate; add B A ipcomp 45 -m tunnel -C deflate; spdadd A B any -P in ipsec ipcomp/tunnel/192.168.1.2-192.168.1.3/use; spdadd B A any -P out ipsec ipcomp/tunnel/192.168.1.3-192.168.1.2/use; -------------------- Obviously applications want the events even when the table is empty. So we cannot make this behavioral change. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 8b8e26a9e401..79d2c0f3c334 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1751,7 +1751,7 @@ static int pfkey_flush(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hd
audit_info.secid = 0;
err = xfrm_state_flush(net, proto, &audit_info);
if (err)
- return 0;
+ return err;
c.data.proto = proto;
c.seq = hdr->sadb_msg_seq;
c.pid = hdr->sadb_msg_pid;
@@ -2713,7 +2713,7 @@ static int pfkey_spdflush(struct sock *sk, struct sk_buff *skb, struct sadb_msg
audit_info.secid = 0;
err = xfrm_policy_flush(net, XFRM_POLICY_TYPE_MAIN, &audit_info);
if (err)
- return 0;
+ return err;
c.data.type = XFRM_POLICY_TYPE_MAIN;
c.event = XFRM_MSG_FLUSHPOLICY;
c.pid = hdr->sadb_msg_pid;