/* Define our packet's attributes */
ethernet = (const struct ethernet_header*)(data);
- ip = (const struct ip_header*)(data + size_ethernet);
+ ip = (const struct ip_header*)(ethernet + size_ethernet);
udp = (const struct udp_header*)(data + size_ethernet + size_ip);
payload = (const uint8_t *)(data + size_ethernet + size_ip + size_udp);
if (!fdp || fdp->fd == -1)
return -1;
- if ((rc = otp_write(fdp, (const char *) request, sizeof(*request))) != 0) {
+ if (otp_write(fdp, (const char *) request, sizeof(*request)) != 0) {
return -1;
}
char challenge[OTP_MAX_CHALLENGE_LEN + 1]; /* +1 for '\0' terminator */
int auth_type_found;
- otp_pwe_t pwe;
/* Early exit if Auth-Type != inst->name */
{
return RLM_MODULE_INVALID;
}
- if ((pwe = otp_pwe_present(request)) == 0) {
+ if (otp_pwe_present(request) == 0) {
(void) radlog(L_AUTH, "rlm_otp: %s: Attribute \"User-Password\" "
"or equivalent required for authentication.",
__func__);