At 05:40 AM 3/13/2002 -0700, Charlie Watts wrote:
>On Tue, 12 Mar 2002, Chris Parker wrote:
>
> > At 06:20 PM 3/11/2002 -0700, Charlie Watts wrote:
> > >On Mon, 11 Mar 2002, Chris Parker wrote:
> > > > At 10:18 AM 3/11/2002 -0700, Charlie Watts wrote:
> > I would hazzard that your radtest is interpreting the filters incorrectly.
>
>I was thinking perhaps it was showing the binary (ergh) versions of them.
>It was ancient and, indeed, probably broken. No matter, I've switched from
>it to the freeradius radtest; behaviour is still as described.
>
> > >I uncommented your DEBUG2 lines in rlm_attr_filter.c and re-compiled.
> > >Here's an example of what I see when using the := syntax:
> > >
> > >modcall: entering group authorize
> > > modcall[authorize]: module "preprocess" returns ok
> > > attr_filter: Matched entry realm.test at line 79
> > > attr_filter: creating vp Service-Type - 1 - 2
> > > attr_filter: creating vp Login-Service - 1 - 1
> > > attr_filter: creating vp Ascend-Data-Filter - 4 - 0
> > > attr_filter: creating vp Ascend-Data-Filter - 4 - 0
> > > attr_filter: creating vp Ascend-Data-Filter - 4 - 0
> > > attr_filter: creating vp Ascend-Data-Filter - 4 - 0
> > > modcall[authorize]: module "attr_filter" returns updated
> >
> > That tells you that 'attr_filter' created 6 a/v pairs and added them
> > to the reply. They are all separate vp's at this point.
> >
> > > Ascend-Data-Filter = "ip input forward 0"
> > > Ascend-Data-Filter = "ip input forward 0"
> > > Ascend-Data-Filter = "ip output drop 0"
> > > Ascend-Data-Filter = "ip input forward 0"
> > >Finished request 0
> >
> > Hmm, now that is a problem, as it shouldn't be setting 0.
>
>Is it really "setting 0" ? It is getting "ip input forward" and "ip input
>drop" before the 0 - so at least part of the strvalue is getting through.
>Right?
Maybe. Need to see the binary data for the string, before it's passed
to the 'print_abinary()' function. Either the binary data is wrong,
or print_abinary() is doing something wrong.
> > The problem is *possibly* in src/lib/filters.c, as that is where
> > Data-Filters are parsed from text into binary data.
>
>I assume you mean print_abinary(), which I only see used once in the whole
>tree, in src/lib/print.c.
src/lib/filters.c is where the server takes the attributes and converts
it to binary data for the attribute.
src/lib/print.c is where it takes the binary data from the attribute and
prints it in human readable text.
It's possible that one of those is not doing it correctly.
> > If you aren't already, I'd upgrade to the latest CVS version, as there
> > has been some work done at some point in the handling of Data-Filters,
> > but I don't recall if that was before or after the 0.4 release.
>
>I'm using CVS. Wouldn't think to ask if I wasn't. :-)
I'd just confirm that you are loading the latest libraries. I'm not
able to duplicate the problem here with. It *could* be a library mismatch.
The next step would be, as described above to get the raw binary data for
the attribute that's being passed to 'print_abinary()' to see if it's the
data that's bad or the function that's wrong.
-Chris
--
\\\|||/// \ StarNet Inc. \ Chris Parker
\ ~ ~ / \ WX *is* Wireless! \ Director, Engineering
| @ @ | \ http://www.starnetwx.net \ (847) 963-0116
oOo---(_)---oOo--\------------------------------------------------------
\ Wholesale Internet Services - http://www.megapop.net
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html