sqlippool in 3.0

Phil Mayers p.mayers at imperial.ac.uk
Fri Oct 11 17:12:02 CEST 2013


On 11/10/13 11:17, Phil Mayers wrote:
> I think this is broken; specifically, "ip_allocation" is used undefined
> in the successful case.

No, that's not it; the problem is that vp_length is unset i.e. 0.

For some reason:

  fr_strerror_printf("WARNING: Skipping zero-length attribute

...in src/lib/radius.c isn't warning about this.

Fix is simple:

diff --git a/src/modules/rlm_sqlippool/rlm_sqlippool.c 
b/src/modules/rlm_sqlippool/rlm_sqlippool.c
index 1db4478..bb0c98e 100644
--- a/src/modules/rlm_sqlippool/rlm_sqlippool.c
+++ b/src/modules/rlm_sqlippool/rlm_sqlippool.c
@@ -607,6 +607,7 @@ static rlm_rcode_t mod_post_auth(void *instance, 
REQUEST *request)
         vp = radius_paircreate(request, &request->reply->vps,
                                PW_FRAMED_IP_ADDRESS, 0);
         vp->vp_ipaddr = ip_allocation;
+       vp->length = 4;

         DO(allocate_commit);



More information about the Freeradius-Devel mailing list