From 20de7e8ac37233f9dabc4e13f29586f9a7addfc7 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 21 Sep 2005 02:07:26 +0000 Subject: name union. From ume FreeBSD --- usr.sbin/ppp/ppp/radius.c | 18 ++++++++++-------- usr.sbin/ppp/ppp/radius.h | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ppp/ppp/radius.c b/usr.sbin/ppp/ppp/radius.c index 303c7000b9a..43093f153d1 100644 --- a/usr.sbin/ppp/ppp/radius.c +++ b/usr.sbin/ppp/ppp/radius.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: radius.c,v 1.29 2005/09/21 01:59:26 brad Exp $ + * $OpenBSD: radius.c,v 1.30 2005/09/21 02:07:25 brad Exp $ * */ @@ -987,8 +987,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 @@ -997,7 +997,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 @@ -1074,8 +1074,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; @@ -1083,8 +1085,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/ppp/radius.h b/usr.sbin/ppp/ppp/radius.h index 7fa40f57356..e008c55772a 100644 --- a/usr.sbin/ppp/ppp/radius.h +++ b/usr.sbin/ppp/ppp/radius.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: radius.h,v 1.13 2005/09/21 01:43:07 brad Exp $ + * $OpenBSD: radius.h,v 1.14 2005/09/21 02:07:25 brad Exp $ */ #define MPPE_POLICY_ALLOWED 1 @@ -85,7 +85,7 @@ struct radacct { u_char ifid[8]; } ipv6; #endif - }; + } peer; }; #define descriptor2radius(d) \ -- cgit v1.2.3