- if (c->event == XFRM_SAP_ADDED)
- nlt = XFRM_MSG_NEWPOLICY;
- else if (c->event == XFRM_SAP_UPDATED)
- nlt = XFRM_MSG_UPDPOLICY;
- else if (c->event == XFRM_SAP_DELETED)
- nlt = XFRM_MSG_DELPOLICY;
- else
- goto nlmsg_failure;
-
- nlh = NLMSG_PUT(skb, c->pid, c->seq, nlt, sizeof(*p));
+ nlh = NLMSG_PUT(skb, c->pid, c->seq, c->event, headlen);