From: Tobias Brunner Date: Fri, 10 Oct 2008 21:07:03 +0000 (-0700) Subject: af_key: fix SADB_X_SPDDELETE response X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1839faab9a2747bcd30ee14e50575a39bf6735d4;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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. Signed-off-by: Tobias Brunner Signed-off-by: David S. Miller --- diff --git a/net/key/af_key.c b/net/key/af_key.c index 362fe317e1f3..e55e0441e4d9 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -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);