diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-09-28 16:16:33 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-09-28 16:28:54 +0200 |
commit | 9f22002706b494c6c955e74b72f8c90f8ad6baa1 (patch) | |
tree | f6b7616ca0baa559d96684a44308beb36c77a8f5 /src | |
parent | 9d5b688a11dd255f554b6821a956f87a6df1a29f (diff) | |
download | strongswan-9f22002706b494c6c955e74b72f8c90f8ad6baa1.tar.bz2 strongswan-9f22002706b494c6c955e74b72f8c90f8ad6baa1.tar.xz |
The eap argument of send_response is never NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/plugins/tnc_pdp/tnc_pdp.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/libcharon/plugins/tnc_pdp/tnc_pdp.c b/src/libcharon/plugins/tnc_pdp/tnc_pdp.c index 69f0f26bc..77eaa0e05 100644 --- a/src/libcharon/plugins/tnc_pdp/tnc_pdp.c +++ b/src/libcharon/plugins/tnc_pdp/tnc_pdp.c @@ -220,7 +220,7 @@ static chunk_t encrypt_mppe_key(private_tnc_pdp_t *this, u_int8_t type, { free(data.ptr); return chunk_empty; - } + } *a.ptr |= 0x80; } while (mppe_key->salt == *salt); @@ -266,20 +266,18 @@ static void send_response(private_tnc_pdp_t *this, radius_message_t *request, u_int16_t salt = 0; 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 */ - while (data.len > MAX_RADIUS_ATTRIBUTE_SIZE) - { - response->add(response, RAT_EAP_MESSAGE, - chunk_create(data.ptr, MAX_RADIUS_ATTRIBUTE_SIZE)); - data = chunk_skip(data, MAX_RADIUS_ATTRIBUTE_SIZE); - } - response->add(response, RAT_EAP_MESSAGE, data); + /* fragment data suitable for RADIUS */ + while (data.len > MAX_RADIUS_ATTRIBUTE_SIZE) + { + response->add(response, RAT_EAP_MESSAGE, + chunk_create(data.ptr, MAX_RADIUS_ATTRIBUTE_SIZE)); + data = chunk_skip(data, MAX_RADIUS_ATTRIBUTE_SIZE); } + response->add(response, RAT_EAP_MESSAGE, data); + if (group) { tunnel_type = RADIUS_TUNNEL_TYPE_ESP; |