Pool-Name from Called-Station-Id
Another classic Dumb Question. Over the next few months I'm going to be setting up a lot of IP pools for sqlippool. My Pool-Name's are based on the Called-Station-Id. The way I'm doing it right now is a DEFAULT for each one, like this: DEFAULT Called-Station-Id == brantley_pppoe_141, Pool-Name := "brantley_pppoe_141" Fall-Through = 1 DEFAULT Called-Station-Id == elba_pppoe_142, Pool-Name := "elba_pppoe_142" Fall-Through = 1 [etc] Is there some way I can make this generic, so I don't have to add each one to the users file seperately? Conceptually, it'd be like ... DEFAULT Called-Station-Id == /^(\w+_pppoe_\d+)$/, Pool-Name := "$1" -- hugh
Hugh Messenger wrote:
Is there some way I can make this generic, so I don't have to add each one to the users file seperately? Conceptually, it'd be like ...
DEFAULT Called-Station-Id == /^(\w+_pppoe_\d+)$/, Pool-Name := "$1"
$ man users ... Also see doc/variables.txt. DEFAULT Called-Station-Id =~ "^(\w+_pppoe_\d+)$", Pool-Name := `%{1}` \w && \d may not be supported by the regex library on your system. You may have to use [a-fA-F] etc. explictely. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
participants (2)
-
Alan DeKok -
Hugh Messenger