diff options
Diffstat (limited to 'net/key')
-rw-r--r-- | net/key/af_key.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index f3a026ff9b2c..1c58204d767e 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -2297,16 +2297,17 @@ static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, struct sadb_msg | |||
2297 | &sel, tmp.security, 1); | 2297 | &sel, tmp.security, 1); |
2298 | security_xfrm_policy_free(&tmp); | 2298 | security_xfrm_policy_free(&tmp); |
2299 | 2299 | ||
2300 | xfrm_audit_log(audit_get_loginuid(current->audit_context), 0, | ||
2301 | AUDIT_MAC_IPSEC_DELSPD, (xp) ? 1 : 0, xp, NULL); | ||
2302 | |||
2303 | if (xp == NULL) | 2300 | if (xp == NULL) |
2304 | return -ENOENT; | 2301 | return -ENOENT; |
2305 | 2302 | ||
2306 | err = 0; | 2303 | err = security_xfrm_policy_delete(xp); |
2307 | 2304 | ||
2308 | if ((err = security_xfrm_policy_delete(xp))) | 2305 | xfrm_audit_log(audit_get_loginuid(current->audit_context), 0, |
2306 | AUDIT_MAC_IPSEC_DELSPD, err ? 0 : 1, xp, NULL); | ||
2307 | |||
2308 | if (err) | ||
2309 | goto out; | 2309 | goto out; |
2310 | |||
2310 | c.seq = hdr->sadb_msg_seq; | 2311 | c.seq = hdr->sadb_msg_seq; |
2311 | c.pid = hdr->sadb_msg_pid; | 2312 | c.pid = hdr->sadb_msg_pid; |
2312 | c.event = XFRM_MSG_DELPOLICY; | 2313 | c.event = XFRM_MSG_DELPOLICY; |