|
@@ -1273,10 +1273,6 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|
xp = xfrm_policy_bysel_ctx(type, p->dir, &p->sel, tmp.security, delete);
|
|
xp = xfrm_policy_bysel_ctx(type, p->dir, &p->sel, tmp.security, delete);
|
|
security_xfrm_policy_free(&tmp);
|
|
security_xfrm_policy_free(&tmp);
|
|
}
|
|
}
|
|
- if (delete)
|
|
|
|
- xfrm_audit_log(NETLINK_CB(skb).loginuid, NETLINK_CB(skb).sid,
|
|
|
|
- AUDIT_MAC_IPSEC_DELSPD, (xp) ? 1 : 0, xp, NULL);
|
|
|
|
-
|
|
|
|
if (xp == NULL)
|
|
if (xp == NULL)
|
|
return -ENOENT;
|
|
return -ENOENT;
|
|
|
|
|
|
@@ -1292,8 +1288,14 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|
MSG_DONTWAIT);
|
|
MSG_DONTWAIT);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if ((err = security_xfrm_policy_delete(xp)) != 0)
|
|
|
|
|
|
+ err = security_xfrm_policy_delete(xp);
|
|
|
|
+
|
|
|
|
+ xfrm_audit_log(NETLINK_CB(skb).loginuid, NETLINK_CB(skb).sid,
|
|
|
|
+ AUDIT_MAC_IPSEC_DELSPD, err ? 0 : 1, xp, NULL);
|
|
|
|
+
|
|
|
|
+ if (err != 0)
|
|
goto out;
|
|
goto out;
|
|
|
|
+
|
|
c.data.byid = p->index;
|
|
c.data.byid = p->index;
|
|
c.event = nlh->nlmsg_type;
|
|
c.event = nlh->nlmsg_type;
|
|
c.seq = nlh->nlmsg_seq;
|
|
c.seq = nlh->nlmsg_seq;
|