Skip to content

Commit

Permalink
af_key: fix SADB_X_SPDDELETE response
Browse files Browse the repository at this point in the history
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 <tobias.brunner@strongswan.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tobias Brunner authored and David S. Miller committed Oct 10, 2008
1 parent d2a3b22 commit 1839faa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1839faa

Please sign in to comment.