Created
March 21, 2011 18:00
-
-
Save chudler/879885 to your computer and use it in GitHub Desktop.
freeradius:src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c -- What happens if Framed-MTU == 14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* We use default fragment size, unless the Framed-MTU | |
* tells us it's too big. Note that we do NOT account | |
* for the EAP-TLS headers if conf->fragment_size is | |
* large, because that config item looks to be confusing. | |
* | |
* i.e. it should REALLY be called MTU, and the code here | |
* should figure out what that means for TLS fragment size. | |
* asking the administrator to know the internal details | |
* of EAP-TLS in order to calculate fragment sizes is | |
* just too much. | |
*/ | |
ssn->offset = inst->conf->fragment_size; | |
vp = pairfind(handler->request->packet->vps, PW_FRAMED_MTU); | |
if (vp && ((vp->vp_integer - 14) < ssn->offset)) { | |
/* | |
* Discount the Framed-MTU by: | |
* 4 : EAPOL header | |
* 4 : EAP header (code + id + length) | |
* 1 : EAP type == EAP-TLS | |
* 1 : EAP-TLS Flags | |
* 4 : EAP-TLS Message length | |
* (even if conf->include_length == 0, | |
* just to be lazy). | |
* --- | |
* 14 | |
*/ | |
ssn->offset = vp->vp_integer - 14; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment