Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 151bb0ff authored by Jerome Borsboom's avatar Jerome Borsboom Committed by David S. Miller
Browse files

[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: default avatarJerome Borsboom <j.borsboom@erasmusmc.nl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cabcac0b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;