From owner-freebsd-net Wed Apr 3 9:31: 4 2002 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id 5A28937B41E; Wed, 3 Apr 2002 09:30:02 -0800 (PST) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id JAA51733; Wed, 3 Apr 2002 09:23:57 -0800 (PST) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g33HNDa75761; Wed, 3 Apr 2002 09:23:13 -0800 (PST) (envelope-from archie) From: Archie Cobbs Message-Id: <200204031723.g33HNDa75761@arch20m.dellroad.org> Subject: Re: Please review: ppp(8) and RADIUS address allocation In-Reply-To: <86zo0lqdjf.wl@bougainvillea.FromTo.Cc> "from Tatsumi Hosokawa at Apr 3, 2002 07:31:16 pm" To: Tatsumi Hosokawa Date: Wed, 3 Apr 2002 09:23:13 -0800 (PST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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 Tatsumi Hosokawa writes: > Following patch can fix this problem. Please review it. > > - 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 */ This patch will only work for little-endian machines. Suggest you put some htonl() and ntohl() in there. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message