summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2002-06-02 14:27:02 +0000
committerbrian <brian@FreeBSD.org>2002-06-02 14:27:02 +0000
commitf1bf75d03ded7a1a26968d70f00acaf346742364 (patch)
tree842736311a912aea5e98066ed4f24b9cdc10aa93 /usr.sbin/ppp
parentb93a81cb4e396134e70045351dfc15acda794481 (diff)
downloadFreeBSD-src-f1bf75d03ded7a1a26968d70f00acaf346742364.zip
FreeBSD-src-f1bf75d03ded7a1a26968d70f00acaf346742364.tar.gz
Don't send a RAD_NAS_IP_ADDRESS attribute as RAD_NAS_IDENTIFIER is
sufficient. In fact, using both breaks the radiator RADIUS daemon when used with a db as it maps both attributes to the same field value and then fails the insert. I decided to remove RAD_NAS_IP_ADDRESS on the basis that rfc2138 says: An Access-Request MUST contain a User-Name attribute. It SHOULD contain either a NAS-IP-Address attribute or NAS-Identifier attribute (or both, although that is not recommended). It MUST despite the fact that this not recommended bit was removed from the updated rfc.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/radius.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.sbin/ppp/radius.c b/usr.sbin/ppp/radius.c
index dd0f4a2..cb3872e 100644
--- a/usr.sbin/ppp/radius.c
+++ b/usr.sbin/ppp/radius.c
@@ -548,7 +548,9 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
struct timeval tv;
int got;
char hostname[MAXHOSTNAMELEN];
+#if 0
struct hostent *hp;
+#endif
struct in_addr hostaddr;
#ifndef NODES
struct mschap_response msresp;
@@ -671,6 +673,7 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
if (gethostname(hostname, sizeof hostname) != 0)
log_Printf(LogERROR, "rad_put: gethostname(): %s\n", strerror(errno));
else {
+#if 0
if ((hp = gethostbyname(hostname)) != NULL) {
hostaddr.s_addr = *(u_long *)hp->h_addr;
if (rad_put_addr(r->cx.rad, RAD_NAS_IP_ADDRESS, hostaddr) != 0) {
@@ -680,6 +683,7 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
return 0;
}
}
+#endif
if (rad_put_string(r->cx.rad, RAD_NAS_IDENTIFIER, hostname) != 0) {
log_Printf(LogERROR, "rad_put: rad_put_string: %s\n",
rad_strerror(r->cx.rad));
@@ -717,7 +721,9 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
struct timeval tv;
int got;
char hostname[MAXHOSTNAMELEN];
+#if 0
struct hostent *hp;
+#endif
struct in_addr hostaddr;
if (!*r->cfg.file)
@@ -786,6 +792,7 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
if (gethostname(hostname, sizeof hostname) != 0)
log_Printf(LogERROR, "rad_put: gethostname(): %s\n", strerror(errno));
else {
+#if 0
if ((hp = gethostbyname(hostname)) != NULL) {
hostaddr.s_addr = *(u_long *)hp->h_addr;
if (rad_put_addr(r->cx.rad, RAD_NAS_IP_ADDRESS, hostaddr) != 0) {
@@ -795,6 +802,7 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
return;
}
}
+#endif
if (rad_put_string(r->cx.rad, RAD_NAS_IDENTIFIER, hostname) != 0) {
log_Printf(LogERROR, "rad_put: rad_put_string: %s\n",
rad_strerror(r->cx.rad));
OpenPOWER on IntegriCloud