Include source port in init hash for fragmented messages
This commit is contained in:
@@ -975,7 +975,8 @@ static bool get_init_hash(private_ike_sa_manager_t *this, message_t *message,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (message->get_first_payload_type(message) == FRAGMENT_V1)
|
if (message->get_first_payload_type(message) == FRAGMENT_V1)
|
||||||
{ /* only hash the source IP and SPI for fragmented init messages */
|
{ /* only hash the source IP, port and SPI for fragmented init messages */
|
||||||
|
u_int16_t port;
|
||||||
u_int64_t spi;
|
u_int64_t spi;
|
||||||
|
|
||||||
src = message->get_source(message);
|
src = message->get_source(message);
|
||||||
@@ -984,6 +985,12 @@ static bool get_init_hash(private_ike_sa_manager_t *this, message_t *message,
|
|||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
port = src->get_port(src);
|
||||||
|
if (!this->hasher->allocate_hash(this->hasher,
|
||||||
|
chunk_from_thing(port), NULL))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
spi = message->get_initiator_spi(message);
|
spi = message->get_initiator_spi(message);
|
||||||
return this->hasher->allocate_hash(this->hasher,
|
return this->hasher->allocate_hash(this->hasher,
|
||||||
chunk_from_thing(spi), hash);
|
chunk_from_thing(spi), hash);
|
||||||
|
|||||||
Reference in New Issue
Block a user