Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Apr 2002 09:23:13 -0800 (PST)
From:      Archie Cobbs <archie@dellroad.org>
To:        Tatsumi Hosokawa <hosokawa@FreeBSD.ORG>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: Please review: ppp(8) and RADIUS address allocation
Message-ID:  <200204031723.g33HNDa75761@arch20m.dellroad.org>
In-Reply-To: <86zo0lqdjf.wl@bougainvillea.FromTo.Cc> "from Tatsumi Hosokawa at Apr 3, 2002 07:31:16 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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




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