Skip to contentSkip to conversation

af_key: fix SADB_X_SPDDELETE response

PATCH Applied Tobias Brunner 2 participants 2 messages Oct 10, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 af_key: fix SADB_X_SPDDELETE response

When deleting an SPD entry using SADB_X_SPDDELETE, c.data.byid is not initialized to zero in pfkey_spddelete(). Thus, key_notify_policy() responds with a PF_KEY message of type SADB_X_SPDDELETE2 instead of SADB_X_SPDDELETE.

---

net/key/af_key.c +0 -0
index 362fe31..e55e044 100644
@@ -2341,6 +2341,7 @@ static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, struct sadb_msg
 
	c.seq = hdr->sadb_msg_seq;
	c.pid = hdr->sadb_msg_pid;
+	c.data.byid = 0;
	c.event = XFRM_MSG_DELPOLICY;
	km_policy_notify(xp, pol->sadb_x_policy_dir-1, &c);
maintainer Applied
#1 lore raw

From: Tobias Brunner <[email protected]>
Date: Fri, 10 Oct 2008 22:16:48 +0200

Quoted 6 lines

When deleting an SPD entry using SADB_X_SPDDELETE, c.data.byid is not initialized to zero in pfkey_spddelete(). Thus, key_notify_policy() responds with a PF_KEY message of type SADB_X_SPDDELETE2 instead of SADB_X_SPDDELETE.

Applied, thanks.