summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/radius.c16
-rw-r--r--usr.sbin/ppp/radius.h2
2 files changed, 10 insertions, 8 deletions
diff --git a/usr.sbin/ppp/radius.c b/usr.sbin/ppp/radius.c
index 4450757..75fa78d 100644
--- a/usr.sbin/ppp/radius.c
+++ b/usr.sbin/ppp/radius.c
@@ -984,8 +984,8 @@ radius_Account_Set_Ip(struct radacct *ac, struct in_addr *peer_ip,
struct in_addr *netmask)
{
ac->proto = PROTO_IPCP;
- memcpy(&ac->ip.addr, peer_ip, sizeof(ac->ip.addr));
- memcpy(&ac->ip.mask, netmask, sizeof(ac->ip.mask));
+ memcpy(&ac->peer.ip.addr, peer_ip, sizeof(ac->peer.ip.addr));
+ memcpy(&ac->peer.ip.mask, netmask, sizeof(ac->peer.ip.mask));
}
#ifndef NOINET6
@@ -994,7 +994,7 @@ void
radius_Account_Set_Ipv6(struct radacct *ac, u_char *ifid)
{
ac->proto = PROTO_IPV6CP;
- memcpy(&ac->ipv6.ifid, ifid, sizeof(ac->ipv6.ifid));
+ memcpy(&ac->peer.ipv6.ifid, ifid, sizeof(ac->peer.ipv6.ifid));
}
#endif
@@ -1071,8 +1071,10 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
}
switch (ac->proto) {
case PROTO_IPCP:
- if (rad_put_addr(r->cx.rad, RAD_FRAMED_IP_ADDRESS, ac->ip.addr) != 0 ||
- rad_put_addr(r->cx.rad, RAD_FRAMED_IP_NETMASK, ac->ip.mask) != 0) {
+ if (rad_put_addr(r->cx.rad, RAD_FRAMED_IP_ADDRESS,
+ ac->peer.ip.addr) != 0 || \
+ rad_put_addr(r->cx.rad, RAD_FRAMED_IP_NETMASK,
+ ac->peer.ip.mask) != 0) {
log_Printf(LogERROR, "rad_put: %s\n", rad_strerror(r->cx.rad));
rad_close(r->cx.rad);
return;
@@ -1080,8 +1082,8 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
break;
#ifndef NOINET6
case PROTO_IPV6CP:
- if (rad_put_attr(r->cx.rad, RAD_FRAMED_INTERFACE_ID, ac->ipv6.ifid,
- sizeof(ac->ipv6.ifid)) != 0) {
+ if (rad_put_attr(r->cx.rad, RAD_FRAMED_INTERFACE_ID, ac->peer.ipv6.ifid,
+ sizeof(ac->peer.ipv6.ifid)) != 0) {
log_Printf(LogERROR, "rad_put_attr: %s\n", rad_strerror(r->cx.rad));
rad_close(r->cx.rad);
return;
diff --git a/usr.sbin/ppp/radius.h b/usr.sbin/ppp/radius.h
index 48d0e23..29b5190 100644
--- a/usr.sbin/ppp/radius.h
+++ b/usr.sbin/ppp/radius.h
@@ -85,7 +85,7 @@ struct radacct {
u_char ifid[8];
} ipv6;
#endif
- };
+ } peer;
};
#define descriptor2radius(d) \
OpenPOWER on IntegriCloud