EXAMPLE: unlang removing attribute inside a test

Alan DeKok aland at deployingradius.com
Wed Jan 23 10:46:36 CET 2008


Mike O'Connor wrote:
> One issue I could not seem to find a way of removing an attribute unless
> both the attribute and value match, this means that I have to list each
> of the pool individually.

  One option is to add more filtering operators.  e.g. "-~", meaning
"regex match, and remove".  Or perhaps a better way, is to add a
"filter" section:

    filter request {     # filter out attributes matching the following
	  Foo =~ /bar/   #  remove by regex
    }

  Also, adding a "require" section may be useful, too:

    require request {   # filter out attributes NOT matching ....
	Foo =~ /bar/
    }

  Alan DeKok.



More information about the Freeradius-Users mailing list