out_hdr = (struct sadb_msg *) out_skb->data; out_hdr->sadb_msg_version = hdr->sadb_msg_version; out_hdr->sadb_msg_type = SADB_X_SPDDELETE; out_hdr->sadb_msg_satype = 0; out_hdr->sadb_msg_errno = 0; out_hdr->sadb_msg_seq = hdr->sadb_msg_seq; out_hdr->sadb_msg_pid = hdr->sadb_msg_pid; pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ALL, sk); err = 0;  out: 
static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, void **ext_hdrs){	int err;	struct sadb_address *sa;	struct sadb_x_policy *pol;	struct xfrm_policy *xp;	struct sk_buff *out_skb;	struct sadb_msg *out_hdr;	struct xfrm_selector sel;	if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC-1],				     ext_hdrs[SADB_EXT_ADDRESS_DST-1]) ||	    !ext_hdrs[SADB_X_EXT_POLICY-1])		return -EINVAL;	pol = ext_hdrs[SADB_X_EXT_POLICY-1];	if (!pol->sadb_x_policy_dir || pol->sadb_x_policy_dir >= IPSEC_DIR_MAX)		return -EINVAL;	memset(&sel, 0, sizeof(sel));	sa = ext_hdrs[SADB_EXT_ADDRESS_SRC-1], 	sel.family = pfkey_sadb_addr2xfrm_addr(sa, &sel.saddr);	sel.prefixlen_s = sa->sadb_address_prefixlen;	sel.proto = pfkey_proto_to_xfrm(sa->sadb_address_proto);	sel.sport = ((struct sockaddr_in *)(sa+1))->sin_port;	if (sel.sport)		sel.sport_mask = ~0;	sa = ext_hdrs[SADB_EXT_ADDRESS_DST-1], 	pfkey_sadb_addr2xfrm_addr(sa, &sel.daddr);	sel.prefixlen_d = sa->sadb_address_prefixlen;	sel.proto = pfkey_proto_to_xfrm(sa->sadb_address_proto);	sel.dport = ((struct sockaddr_in *)(sa+1))->sin_port;	if (sel.dport)		sel.dport_mask = ~0;	xp = xfrm_policy_bysel(pol->sadb_x_policy_dir-1, &sel, 1);	if (xp == NULL)		return -ENOENT;	err = 0;	out_skb = pfkey_xfrm_policy2msg_prep(xp);	if (IS_ERR(out_skb)) {		err =  PTR_ERR(out_skb);		goto out;	}	pfkey_xfrm_policy2msg(out_skb, xp, pol->sadb_x_policy_dir-1);	out_hdr = (struct sadb_msg *) out_skb->data;	out_hdr->sadb_msg_version = hdr->sadb_msg_version;	out_hdr->sadb_msg_type = SADB_X_SPDDELETE;	out_hdr->sadb_msg_satype = 0;	out_hdr->sadb_msg_errno = 0;	out_hdr->sadb_msg_seq = hdr->sadb_msg_seq;	out_hdr->sadb_msg_pid = hdr->sadb_msg_pid;	pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ALL, sk);	err = 0;out:	xfrm_pol_put(xp);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/26b15dad9f1c19d6d4f7b999b07eaa6d98e4b375/af_key.c/buggy/net/key/af_key.c