Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use correct packet for channel binding. Closes #1990
  • Loading branch information
alandekok committed May 16, 2017
1 parent fba1d6f commit 3047fc6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/modules/rlm_eap/libeap/eap_chbind.c
Expand Up @@ -280,15 +280,15 @@ chbind_packet_t *eap_chbind_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps)
return packet;
}

VALUE_PAIR *eap_chbind_packet2vp(REQUEST *request, chbind_packet_t *packet)
VALUE_PAIR *eap_chbind_packet2vp(RADIUS_PACKET *packet, chbind_packet_t *chbind)
{
VALUE_PAIR *vp;

if (!packet) return NULL; /* don't produce garbage */
if (!chbind) return NULL; /* don't produce garbage */

vp = fr_pair_afrom_num(request->packet, PW_UKERNA_CHBIND, VENDORPEC_UKERNA);
vp = fr_pair_afrom_num(packet, PW_UKERNA_CHBIND, VENDORPEC_UKERNA);
if (!vp) return NULL;
fr_pair_value_memcpy(vp, (uint8_t *) packet, talloc_array_length((uint8_t *)packet));
fr_pair_value_memcpy(vp, (uint8_t *) chbind, talloc_array_length((uint8_t *)chbind));

return vp;
}
2 changes: 1 addition & 1 deletion src/modules/rlm_eap/libeap/eap_chbind.h
Expand Up @@ -58,7 +58,7 @@ typedef struct CHBIND_REQ {
/* Channel binding function prototypes */
PW_CODE chbind_process(REQUEST *request, CHBIND_REQ *chbind_req);

VALUE_PAIR *eap_chbind_packet2vp(REQUEST *request, chbind_packet_t *packet);
VALUE_PAIR *eap_chbind_packet2vp(RADIUS_PACKET *packet, chbind_packet_t *chbind);
chbind_packet_t *eap_chbind_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps);

#endif /*_EAP_CHBIND_H*/
2 changes: 1 addition & 1 deletion src/modules/rlm_eap/types/rlm_eap_ttls/ttls.c
Expand Up @@ -1183,7 +1183,7 @@ int eapttls_process(eap_handler_t *handler, tls_session_t *tls_session)
if (req->response) {
RDEBUG("sending chbind response");
fr_pair_add(&fake->reply->vps,
eap_chbind_packet2vp(fake, req->response));
eap_chbind_packet2vp(fake->reply, req->response));
} else {
RDEBUG("no chbind response");
}
Expand Down

0 comments on commit 3047fc6

Please sign in to comment.