diff options
author | Jerome Borsboom <j.borsboom@erasmusmc.nl> | 2006-01-24 12:57:19 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-01-24 12:57:19 -0800 |
commit | 151bb0ffe51514979abf54063bb5c1dd49365137 (patch) | |
tree | b8d3465f3a9f682640589395befae5e475168b64 /net | |
parent | cabcac0b296cd9683bc168d60839729b720dc2b7 (diff) | |
download | op-kernel-dev-151bb0ffe51514979abf54063bb5c1dd49365137.zip op-kernel-dev-151bb0ffe51514979abf54063bb5c1dd49365137.tar.gz |
[AF_KEY]: no message type set
When returning a message to userspace in reply to a SADB_FLUSH or
SADB_X_SPDFLUSH message, the type was not set for the returned PFKEY
message. The patch below corrects this problem.
Signed-off-by: Jerome Borsboom <j.borsboom@erasmusmc.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/key/af_key.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 43f1ce7..ae86d23 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -1620,6 +1620,7 @@ static int key_notify_sa_flush(struct km_event *c) return -ENOBUFS; hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); hdr->sadb_msg_satype = pfkey_proto2satype(c->data.proto); + hdr->sadb_msg_type = SADB_FLUSH; hdr->sadb_msg_seq = c->seq; hdr->sadb_msg_pid = c->pid; hdr->sadb_msg_version = PF_KEY_V2; @@ -2385,6 +2386,7 @@ static int key_notify_policy_flush(struct km_event *c) if (!skb_out) return -ENOBUFS; hdr = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg)); + hdr->sadb_msg_type = SADB_X_SPDFLUSH; hdr->sadb_msg_seq = c->seq; hdr->sadb_msg_pid = c->pid; hdr->sadb_msg_version = PF_KEY_V2; |