Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Apr 2002 11:39:59 +0900
From:      Tatsumi Hosokawa <hosokawa@FreeBSD.org>
To:        freebsd-net@freebsd.org
Cc:        hosokawa@freebsd.org
Subject:   Re: Please review: ppp(8) and RADIUS address allocation
Message-ID:  <86zo0kchkw.wl@bougainvillea.FromTo.Cc>
In-Reply-To: <86zo0lqdjf.wl@bougainvillea.FromTo.Cc>
References:  <86zo0lqdjf.wl@bougainvillea.FromTo.Cc>

next in thread | previous in thread | raw e-mail | index | archive | help
At Wed, 03 Apr 2002 19:31:16 +0900,
Tatsumi Hosokawa wrote:
> 
> I'm testing to use FreeBSD box as PPPoE server and found that ppp(8)
> uses 255.255.255.254 (special address to get IP address from NAS pool
> defined in RADIUS protocol) as p2p address when "set radius" is used
> in ppp.conf.  I found the same trouble at
> http://docs.freebsd.org/cgi/getmsg.cgi?fetch=299723+0+archive/2001/freebsd-net/20010812.freebsd-net

Updated patch against -current.  Endian problem was fixed.

Index: auth.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/auth.c,v
retrieving revision 1.53
diff -u -r1.53 auth.c
--- auth.c	8 Jan 2002 11:24:39 -0000	1.53
+++ auth.c	4 Apr 2002 01:08:13 -0000
@@ -170,7 +170,8 @@
   }
 
 #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;
Index: radius.h
===================================================================
RCS file: /home/ncvs/src/usr.sbin/ppp/radius.h,v
retrieving revision 1.7
diff -u -r1.7 radius.h
--- radius.h	1 Apr 2001 22:39:17 -0000	1.7
+++ radius.h	4 Apr 2002 01:08:13 -0000
@@ -76,3 +76,6 @@
 #define RAD_START	1
 #define RAD_STOP	2
 #endif
+
+/* Get address from NAS pool */
+#define RADIUS_INADDR_POOL	htonl(0xfffffffe)	/* 255.255.255.254 */


--
Tatsumi Hosokawa
<hosokawa@FreeBSD.org>
http://FromTo.Cc/hosokawa/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86zo0kchkw.wl>