Date: Wed, 3 Apr 2002 15:02:38 -0500 From: Barney Wolff <barney@databus.com> To: Tatsumi Hosokawa <hosokawa@FreeBSD.ORG> Cc: freebsd-net@FreeBSD.ORG Subject: Re: Please review: ppp(8) and RADIUS address allocation Message-ID: <20020403150238.C76772@tp.databus.com> In-Reply-To: <86zo0lqdjf.wl@bougainvillea.FromTo.Cc>; from hosokawa@FreeBSD.ORG on Wed, Apr 03, 2002 at 07:31:16PM %2B0900 References: <86zo0lqdjf.wl@bougainvillea.FromTo.Cc>
next in thread | previous in thread | raw e-mail | index | archive | help
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 > <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 -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020403150238.C76772>