From 33b47634a860b32588e127b1999c42e39cf06bd7 Mon Sep 17 00:00:00 2001 From: Tatsumi Hosokawa Date: Thu, 4 Apr 2002 08:43:00 +0000 Subject: [PATCH] Get tun P2P address from the local pool if RADIUS server returned 255.255.255.254 as client ipaddr. Reviewed-By: freebsd-net mailing list --- usr.sbin/ppp/auth.c | 3 ++- usr.sbin/ppp/radius.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c index 9085c08aff0e..1368cc3a8d72 100644 --- a/usr.sbin/ppp/auth.c +++ b/usr.sbin/ppp/auth.c @@ -170,7 +170,8 @@ auth_Select(struct bundle *bundle, const char *name) } #ifndef NORADIUS - if (bundle->radius.valid && bundle->radius.ip.s_addr != INADDR_NONE) { + if (bundle->radius.valid && bundle->radius.ip.s_addr != INADDR_NONE && + bundle->radius.ip.s_addr != RADIUS_INADDR_POOL) { /* We've got a radius IP - it overrides everything */ if (!ipcp_UseHisIPaddr(bundle, bundle->radius.ip)) return 0; diff --git a/usr.sbin/ppp/radius.h b/usr.sbin/ppp/radius.h index ca54615431ff..152df3f6a2f0 100644 --- a/usr.sbin/ppp/radius.h +++ b/usr.sbin/ppp/radius.h @@ -76,3 +76,6 @@ extern void radius_Account(struct radius *, struct radacct *, #define RAD_START 1 #define RAD_STOP 2 #endif + +/* Get address from NAS pool */ +#define RADIUS_INADDR_POOL htonl(0xfffffffe) /* 255.255.255.254 */