Commit 0c51f53c authored by Jamal Hadi Salim's avatar Jamal Hadi Salim Committed by David S. Miller
Browse files

[XFRM]: Make flush notifier prettier when subpolicy used

Might as well make flush notifier prettier when subpolicy used
Signed-off-by: default avatarJamal Hadi Salim <>
Signed-off-by: default avatarDavid S. Miller <>
parent 46ca5f5d
......@@ -2113,7 +2113,6 @@ static int xfrm_notify_policy_flush(struct km_event *c)
unsigned char *b;
int len = 0;
struct xfrm_userpolicy_type upt;
len += RTA_SPACE(sizeof(struct xfrm_userpolicy_type));
len += NLMSG_LENGTH(0);
......@@ -2126,12 +2125,8 @@ static int xfrm_notify_policy_flush(struct km_event *c)
nlh = NLMSG_PUT(skb, c->pid, c->seq, XFRM_MSG_FLUSHPOLICY, 0);
nlh->nlmsg_flags = 0;
memset(&upt, 0, sizeof(upt));
upt.type = c->data.type;
RTA_PUT(skb, XFRMA_POLICY_TYPE, sizeof(upt), &upt);
if (copy_to_user_policy_type(c->data.type, skb) < 0)
goto nlmsg_failure;
nlh->nlmsg_len = skb->tail - b;
......@@ -2139,9 +2134,6 @@ static int xfrm_notify_policy_flush(struct km_event *c)
return netlink_broadcast(xfrm_nl, skb, 0, XFRMNLGRP_POLICY, GFP_ATOMIC);
return -1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment