Store proposal number in proposal_t to reuse it in the selected proposal
According to RFC 5996 3.3.1, we MUST reuse the proposal number of the selected proposal in the SA payload reply.
This commit is contained in:
@@ -160,6 +160,13 @@ struct proposal_t {
|
||||
*/
|
||||
void (*set_spi) (proposal_t *this, u_int64_t spi);
|
||||
|
||||
/**
|
||||
* Get the proposal number, as encoded in SA payload
|
||||
*
|
||||
* @return proposal number
|
||||
*/
|
||||
u_int (*get_number)(proposal_t *this);
|
||||
|
||||
/**
|
||||
* Check for the eqality of two proposals.
|
||||
*
|
||||
@@ -185,9 +192,10 @@ struct proposal_t {
|
||||
* Create a child proposal for AH, ESP or IKE.
|
||||
*
|
||||
* @param protocol protocol, such as PROTO_ESP
|
||||
* @param number proposal number, as encoded in SA payload
|
||||
* @return proposal_t object
|
||||
*/
|
||||
proposal_t *proposal_create(protocol_id_t protocol);
|
||||
proposal_t *proposal_create(protocol_id_t protocol, u_int number);
|
||||
|
||||
/**
|
||||
* Create a default proposal if nothing further specified.
|
||||
|
||||
Reference in New Issue
Block a user