if (vp->da->flags.encrypt != FLAG_ENCRYPT_NONE) continue;
if (!vp->da->vendor && (vp->da->attr == PW_MESSAGE_AUTHENTICATOR)) continue;
- total = 2 + vp->length;
+ total += 2 + vp->length;
}
/*
for (vp = fr_cursor_init(&cursor, &request->reply->vps);
vp != NULL;
vp = fr_cursor_next(&cursor)) {
- length = rad_vp2attr(NULL, NULL, NULL, &vp, ptr, end - ptr);
- ptr += length;
+ /*
+ * Skip things which shouldn't be in channel bindings.
+ */
+ if (vp->da->flags.encrypt != FLAG_ENCRYPT_NONE) continue;
+ if (!vp->da->vendor && (vp->da->attr == PW_MESSAGE_AUTHENTICATOR)) continue;
+ if (ptr < end) {
+ length = rad_vp2attr(NULL, NULL, NULL, &vp, ptr, end - ptr);
+ ptr += length;
+ }
}
return true;
vp = paircreate(request->packet, PW_UKERNA_CHBIND, VENDORPEC_UKERNA);
if (!vp) return NULL;
- pairmemcpy(vp, (const uint8_t *) packet, talloc_array_length(packet));
+ pairmemcpy(vp, (const uint8_t *) packet, talloc_array_length((uint8_t *)packet));
return vp;
}