The eap argument of send_response is never NULL

This commit is contained in:
Tobias Brunner
2012-09-28 16:28:54 +02:00
parent 9d5b688a11
commit 9f22002706
+10 -12
View File
@@ -266,20 +266,18 @@ static void send_response(private_tnc_pdp_t *this, radius_message_t *request,
u_int16_t salt = 0; u_int16_t salt = 0;
response = radius_message_create(code); response = radius_message_create(code);
if (eap) data = eap->get_data(eap);
{ DBG3(DBG_CFG, "%N payload %B", eap_type_names, this->type, &data);
data = eap->get_data(eap);
DBG3(DBG_CFG, "%N payload %B", eap_type_names, this->type, &data);
/* fragment data suitable for RADIUS */ /* fragment data suitable for RADIUS */
while (data.len > MAX_RADIUS_ATTRIBUTE_SIZE) while (data.len > MAX_RADIUS_ATTRIBUTE_SIZE)
{ {
response->add(response, RAT_EAP_MESSAGE, response->add(response, RAT_EAP_MESSAGE,
chunk_create(data.ptr, MAX_RADIUS_ATTRIBUTE_SIZE)); chunk_create(data.ptr, MAX_RADIUS_ATTRIBUTE_SIZE));
data = chunk_skip(data, MAX_RADIUS_ATTRIBUTE_SIZE); data = chunk_skip(data, MAX_RADIUS_ATTRIBUTE_SIZE);
}
response->add(response, RAT_EAP_MESSAGE, data);
} }
response->add(response, RAT_EAP_MESSAGE, data);
if (group) if (group)
{ {
tunnel_type = RADIUS_TUNNEL_TYPE_ESP; tunnel_type = RADIUS_TUNNEL_TYPE_ESP;