summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/radius.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/usr.sbin/ppp/radius.c b/usr.sbin/ppp/radius.c
index 06f716b..57ed21b 100644
--- a/usr.sbin/ppp/radius.c
+++ b/usr.sbin/ppp/radius.c
@@ -821,6 +821,7 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
struct timeval tv;
int got;
char hostname[MAXHOSTNAMELEN];
+ char *mac_addr;
#if 0
struct hostent *hp;
struct in_addr hostaddr;
@@ -961,6 +962,13 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
}
}
+ if ((mac_addr = getenv("HISMACADDR")) != NULL &&
+ rad_put_string(r->cx.rad, RAD_CALLING_STATION_ID, mac_addr) != 0) {
+ log_Printf(LogERROR, "rad_put: %s\n", rad_strerror(r->cx.rad));
+ rad_close(r->cx.rad);
+ return;
+ }
+
radius_put_physical_details(r->cx.rad, authp->physical);
r->cx.auth = authp;
@@ -1009,6 +1017,7 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
struct timeval tv;
int got;
char hostname[MAXHOSTNAMELEN];
+ char *mac_addr;
#if 0
struct hostent *hp;
struct in_addr hostaddr;
@@ -1108,6 +1117,13 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
break;
}
+ if ((mac_addr = getenv("HISMACADDR")) != NULL &&
+ rad_put_string(r->cx.rad, RAD_CALLING_STATION_ID, mac_addr) != 0) {
+ log_Printf(LogERROR, "rad_put: %s\n", rad_strerror(r->cx.rad));
+ rad_close(r->cx.rad);
+ return;
+ }
+
if (gethostname(hostname, sizeof hostname) != 0)
log_Printf(LogERROR, "rad_put: gethostname(): %s\n", strerror(errno));
else {
OpenPOWER on IntegriCloud