Newslists

Keith Dovale - HostworX.co.za keith at hostworx.co.za
Sat Feb 9 11:43:55 CET 2008


Alan,

I appreciate you coming back to me, I apologise for my inappropriate
comments yesterday, I am as frustrated to hell. I should have asked what was
required first.

Ok  what confuses me is,

A user logs in with shaped access, the group reply sets Configuration token
to SHAPED_NORMAL ok nowhere else is the Configuration-Token setup.

The attrib-rewrite for unshaped kicks in and should check to see if the
Configuration-token is UNSHAPED_LOCAL and if it can't find it rewrite it to
SHAPED_LOCAL is that not right.

Then if the sqlcounter fails move into the next attrib-rewrite.

But in the debug it is looking for SHAPED_NORMAL in the UNSHAPED attrib
rewrite.

Fri Feb  8 17:27:26 2008 : Debug: rlm_attr_rewrite: No match found for
> attribute Configuration-Token with value 'SHAPED_NORMAL'

You say it looks at all the attributes where does is see I have
SHAPED_NORMAL and UNSHAPED_NORMAL set ? This confuses me a little, surely
when the rewrite does its job it overwrites the existing attribute values or
does it just add another ?



Regards

Keith Dovale




-----Original Message-----
From: freeradius-users-bounces+keith=hostworx.co.za at lists.freeradius.org
[mailto:freeradius-users-bounces+keith=hostworx.co.za at lists.freeradius.org]
On Behalf Of Alan DeKok
Sent: Saturday, February 09, 2008 9:43 AM
To: FreeRadius users mailing list
Subject: Re: Newslists

Keith Dovale - HostworX.co.za wrote:
> Ok you asked for the debug log here it is.

  The extra '-x' (which prints the time) is unnecessary, and makes it
harder to read the output.  Still..

> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: attribute =
> "Configuration-Token"
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: searchfor =
> "UNSHAPED_NORMAL"
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: searchin = "reply"
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: replacewith =
> "SHAPED_NORMAL"
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: append = no
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: ignore_case = yes
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: new_attribute = no
> Fri Feb  8 17:24:47 2008 : Debug:  attr_rewrite: max_matches = 1
> Fri Feb  8 17:24:47 2008 : Debug: Module: Instantiated attr_rewrite
> (AttrRewrite_MonthlyBlendedShaped) 

  One instance of attr_rewrite...

> Fri Feb  8 17:27:26 2008 : Debug:   modsingle[authorize]: calling
> AttrRewrite_MonthlyBlendedShaped (rlm_attr_rewrite) for request 3
> Fri Feb  8 17:27:26 2008 : Debug: radius_xlat:  'UNSHAPED_NORMAL'
> Fri Feb  8 17:27:26 2008 : Debug: rlm_attr_rewrite: No match found for
> attribute Configuration-Token with value 'SHAPED_NORMAL'
> Fri Feb  8 17:27:26 2008 : Debug: radius_xlat:  'UNSHAPED_NORMAL'
> Fri Feb  8 17:27:26 2008 : Debug: radius_xlat:  'SHAPED_NORMAL'
> Fri Feb  8 17:27:26 2008 : Debug: rlm_attr_rewrite: Changed value for
> attribute Configuration-Token from 'UNSHAPED_NORMAL' to 'SHAPED_NORMAL'
> Fri Feb  8 17:27:26 2008 : Debug: rlm_attr_rewrite: Could not find value
> pair for attribute Configuration-Token
> Fri Feb  8 17:27:26 2008 : Debug:   modsingle[authorize]: returned from
> AttrRewrite_MonthlyBlendedShaped (rlm_attr_rewrite) for request 3

  The thing about the attr_rewrite module is that it looks at ALL
attributes in the list.  In this case, you have two
Configuration-Tokens.  One has value "SHAPED_NORMAL", and the other
"UNSHAPED_NORMAL".  It doesn't match the first, but it does match the
second.  After that, it says it couldn't find any more.

  There is a bug.  The first "no match found" line prints the value of
the attribute that didn't match, NOT the value it was looking for.
Carefully reading the debug output makes this clear:

  - it says "no match"
  - it says "changed value from UNSHAPED_NORMAL"
  - returns from module AttrRewrite_MonthlyBlendedShaped

  i.e. the FIRST line is wrong.  You were getting confused because you
have *other* attr_rewrite modules which re-write SHAPED_NORMAL.  So
reading the debug log here, it looked like it was trying to re-write
SHAPED_NORMAL.  But it wasn't, because it was NOT running the
AttrRewrite_MonthlyLocal module.

  The only issue I see is that one debug line is wrong, and therefore
confusing.

  Is there anything else?

  Alan DeKok.
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html





More information about the Freeradius-Users mailing list