From owner-freebsd-net Wed Apr 3 12: 2:47 2002 Delivered-To: freebsd-net@freebsd.org Received: from tp.databus.com (p72-186.acedsl.com [66.114.72.186]) by hub.freebsd.org (Postfix) with ESMTP id 3E8B237B405; Wed, 3 Apr 2002 12:02:39 -0800 (PST) Received: (from barney@localhost) by tp.databus.com (8.11.6/8.11.6) id g33K2cd77015; Wed, 3 Apr 2002 15:02:38 -0500 (EST) (envelope-from barney) Date: Wed, 3 Apr 2002 15:02:38 -0500 From: Barney Wolff To: Tatsumi Hosokawa Cc: freebsd-net@FreeBSD.ORG Subject: Re: Please review: ppp(8) and RADIUS address allocation Message-ID: <20020403150238.C76772@tp.databus.com> References: <86zo0lqdjf.wl@bougainvillea.FromTo.Cc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <86zo0lqdjf.wl@bougainvillea.FromTo.Cc>; from hosokawa@FreeBSD.ORG on Wed, Apr 03, 2002 at 07:31:16PM +0900 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org And what would this code do on a Sparc? Don't assume little-endian hardware. As this is hardly time-critical code, memcmp or equivalent is fine. On Wed, Apr 03, 2002 at 07:31:16PM +0900, Tatsumi Hosokawa wrote: > 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 > > http://FromTo.Cc/hosokawa/ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message -- Barney Wolff I never met a computer I didn't like. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message