Skip to contentSkip to conversation

af_key: initialize satype in key_notify_policy_flush()

PATCH Applied Nicolas Dichtel 2 participants 2 messages Feb 18, 2013 – Feb 22, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 af_key: initialize satype in key_notify_policy_flush()

This field was left uninitialized. Some user daemons perform check against this field.

---
 net/key/af_key.c | 1 +
 1 file changed, 1 insertion(+)
net/key/af_key.c +1 -0
index 5b426a6..f9bd41e 100644
@@ -2688,6 +2688,7 @@ static int key_notify_policy_flush(const struct km_event *c)
 	hdr->sadb_msg_pid = c->portid;
 	hdr->sadb_msg_version = PF_KEY_V2;
 	hdr->sadb_msg_errno = (uint8_t) 0;
+	hdr->sadb_msg_satype = SADB_SATYPE_UNSPEC;
 	hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t));
 	pfkey_broadcast(skb_out, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net);
 	return 0;
Signature · 1 line
1.8.0.1