mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Check the return value from rad_cvt_ipv6prefix().
PR: bin/89808 MFC after: 1 week
This commit is contained in:
parent
857be7a47c
commit
a404ab168e
1 changed files with 7 additions and 1 deletions
|
|
@ -453,7 +453,13 @@ radius_Process(struct radius *r, int got)
|
|||
#ifndef NOINET6
|
||||
case RAD_FRAMED_IPV6_PREFIX:
|
||||
free(r->ipv6prefix);
|
||||
r->ipv6prefix = rad_cvt_ipv6prefix(data, len);
|
||||
if ((r->ipv6prefix = rad_cvt_ipv6prefix(data, len)) == NULL) {
|
||||
log_Printf(LogERROR, "rad_cvt_ipv6prefix: %s\n",
|
||||
"Malformed attribute in response");
|
||||
auth_Failure(r->cx.auth);
|
||||
rad_close(r->cx.rad);
|
||||
return;
|
||||
}
|
||||
inet_ntop(AF_INET6, &r->ipv6prefix[2], ipv6addr, sizeof(ipv6addr));
|
||||
log_Printf(log_IsKept(LogRADIUS) ? LogRADIUS : LogPHASE,
|
||||
" IPv6 %s/%d\n", ipv6addr, r->ipv6prefix[1]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue