In the reply to SADB_X_SPDGET message use the same sequence number that

was in the request. Some IKE deamons expect it will the same. Linux and
NetBSD also follow this behaviour.

PR:		137309
MFC after:	2 weeks
This commit is contained in:
Andrey V. Elsukov 2015-05-20 11:59:53 +00:00
parent 2e4335f79b
commit dc4ea824d4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283146

View File

@ -2199,7 +2199,7 @@ key_spddelete2(struct socket *so, struct mbuf *m,
}
/*
* SADB_X_GET processing
* SADB_X_SPDGET processing
* receive
* <base, policy(*)>
* from the user(?),
@ -2237,7 +2237,8 @@ key_spdget(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp)
return key_senderror(so, m, ENOENT);
}
n = key_setdumpsp(sp, SADB_X_SPDGET, 0, mhp->msg->sadb_msg_pid);
n = key_setdumpsp(sp, SADB_X_SPDGET, mhp->msg->sadb_msg_seq,
mhp->msg->sadb_msg_pid);
KEY_FREESP(&sp);
if (n != NULL) {
m_freem(m);