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>
This commit is contained in:
@@ -1525,7 +1525,7 @@ static int xfrm_flush_sa(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
audit_info.secid = NETLINK_CB(skb).sid;
|
||||
err = xfrm_state_flush(net, p->proto, &audit_info);
|
||||
if (err)
|
||||
return 0;
|
||||
return err;
|
||||
c.data.proto = p->proto;
|
||||
c.event = nlh->nlmsg_type;
|
||||
c.seq = nlh->nlmsg_seq;
|
||||
@@ -1677,7 +1677,7 @@ static int xfrm_flush_policy(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
audit_info.secid = NETLINK_CB(skb).sid;
|
||||
err = xfrm_policy_flush(net, type, &audit_info);
|
||||
if (err)
|
||||
return 0;
|
||||
return err;
|
||||
c.data.type = type;
|
||||
c.event = nlh->nlmsg_type;
|
||||
c.seq = nlh->nlmsg_seq;
|
||||
|
Reference in New Issue
Block a user