Properly send IKEv1 packets if no ike_cfg is known yet

This applies for error notifies.
This commit is contained in:
Tobias Brunner
2013-01-14 12:14:16 +01:00
parent c4a49008e8
commit 66bb4f63b2
+5 -2
View File
@@ -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,
packet_t *packet)
{
fragmentation_t fragmentation;
fragmentation_t fragmentation = FRAGMENTATION_NO;
ike_cfg_t *ike_cfg;
host_t *src, *dst;
chunk_t data;
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);
if (data.len > this->frag.size && (fragmentation == FRAGMENTATION_FORCE ||
(this->ike_sa->supports_extension(this->ike_sa, EXT_IKE_FRAGMENTATION) &&