Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Apr 2002 19:31:16 +0900
From:      Tatsumi Hosokawa <hosokawa@FreeBSD.org>
To:        freebsd-net@freebsd.org
Cc:        hosokawa@freebsd.org
Subject:   Please review: ppp(8) and RADIUS address allocation
Message-ID:  <86zo0lqdjf.wl@bougainvillea.FromTo.Cc>

next in thread | raw e-mail | index | archive | help
Hi, all.

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

Following patch can fix this problem.  Please review it.

Thanks.

diff -ur /var/tmp/src/usr.sbin/ppp/auth.c ppp/auth.c
--- /var/tmp/src/usr.sbin/ppp/auth.c	Thu Jun 14 06:56:33 2001
+++ ppp/auth.c	Wed Apr  3 19:05:58 2002
@@ -156,7 +156,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;
diff -ur /var/tmp/src/usr.sbin/ppp/radius.h ppp/radius.h
--- /var/tmp/src/usr.sbin/ppp/radius.h	Fri May 18 04:11:48 2001
+++ ppp/radius.h	Wed Apr  3 19:06:11 2002
@@ -76,3 +76,6 @@
 #define RAD_START	1
 #define RAD_STOP	2
 #endif
+
+/* Get address from NAS pool */
+#define RADIUS_INADDR_POOL	0xfeffffff	/* 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?86zo0lqdjf.wl>