* [PATCH net-next-2.6] af_key: fix SADB_X_SPDDELETE response
@ 2008-10-10 20:16 Tobias Brunner
2008-10-10 21:07 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Brunner @ 2008-10-10 20:16 UTC (permalink / raw)
To: David Miller, netdev
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>
---
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 362fe31..e55e044 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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-10 21:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-10 20:16 [PATCH net-next-2.6] af_key: fix SADB_X_SPDDELETE response Tobias Brunner
2008-10-10 21:07 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).