Properly send IKEv1 packets if no ike_cfg is known yet
This applies for error notifies.
This commit is contained in:
@@ -411,13 +411,16 @@ static bool send_fragment(private_task_manager_t *this, bool request,
|
|||||||
static bool send_packet(private_task_manager_t *this, bool request,
|
static bool send_packet(private_task_manager_t *this, bool request,
|
||||||
packet_t *packet)
|
packet_t *packet)
|
||||||
{
|
{
|
||||||
fragmentation_t fragmentation;
|
fragmentation_t fragmentation = FRAGMENTATION_NO;
|
||||||
ike_cfg_t *ike_cfg;
|
ike_cfg_t *ike_cfg;
|
||||||
host_t *src, *dst;
|
host_t *src, *dst;
|
||||||
chunk_t data;
|
chunk_t data;
|
||||||
|
|
||||||
ike_cfg = this->ike_sa->get_ike_cfg(this->ike_sa);
|
ike_cfg = this->ike_sa->get_ike_cfg(this->ike_sa);
|
||||||
fragmentation = ike_cfg->fragmentation(ike_cfg);
|
if (ike_cfg)
|
||||||
|
{
|
||||||
|
fragmentation = ike_cfg->fragmentation(ike_cfg);
|
||||||
|
}
|
||||||
data = packet->get_data(packet);
|
data = packet->get_data(packet);
|
||||||
if (data.len > this->frag.size && (fragmentation == FRAGMENTATION_FORCE ||
|
if (data.len > this->frag.size && (fragmentation == FRAGMENTATION_FORCE ||
|
||||||
(this->ike_sa->supports_extension(this->ike_sa, EXT_IKE_FRAGMENTATION) &&
|
(this->ike_sa->supports_extension(this->ike_sa, EXT_IKE_FRAGMENTATION) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user