Huntgroup-Name

Alan DeKok aland at deployingradius.com
Thu Feb 1 14:11:28 CET 2018


On Feb 1, 2018, at 8:01 AM, Carsten Schulze <carsten.schulze at leuphana.de> wrote:
>>   Read the debug output.  ALL OF IT.
> I did, thats all

  The answers are in the debug output.

>>   Does the input packet contain NAS-IP-Address?
> No, i thought it is done by the huntgroup file over the == operator

  i.e. you didn't understand my question.

  The input packet is the Access-Request that is printed in the debug output.

  Does the debug output print something like "received  Access-Request"?

  Does the debug output print a list of attributes and values after that?

  Is one of those attributes NAS-IP-Address?

  If so, what is the value of NAS-IP-Address?


>>   Is the "preprocess" module finding that match in the "huntgroups" file?
> yes
> 
> # Loading module "preprocess" from file /etc/freeradius/3.0/mods-enabled/preprocess
>  preprocess {
>        huntgroups = "/etc/freeradius/3.0/mods-config/preprocess/huntgroups"
>        hints = "/etc/freeradius/3.0/mods-config/preprocess/hints"

  No.

  That is the server LOADING the hunt groups file.

  If you READ THE DEBUG OUTPUT, you will see if receiving an Access-Request packet (SEE ABOVE).

  You will ALSO see it running the "preprocess" module.  The "preprocess" module will print out what it matches, if anything.

>>   And the examples DON'T show using %{Huntgroup-Name} to get the name of the hunt group. They DO show using just the attribute reference:
> Yes, but they define HuntGroup as local variable, or not? And the use '%{NAS-IP-Address}' as well

  Instead of listening and paying attention, you're arguing.  Stop it.

  You don't need to use %{...} for attributes in "if" conditions.  The examples and "unlang" documentation don't do this.

> <----
> 
> |update request { Huntgroup-Name := "%{sql:SELECT groupname FROM radhuntgroup WHERE nasipaddress='%{NAS-IP-Address}'}" } ----> |

  That's something different.

  You can:

a) believe you got it wrong, and I have SOME idea what I'm talking about, 

  or

b) believe I'm an idiot and/or lying to you, and they you understand things better than me,

 Do you want to fix the problem, or do you want to argue about details?

>>   I've never understood the need to put %{...} around every attribute name.  Why?  The documentation and examples don't do this.
> I think you need it to access global variables?

  I just said you don't need to do that.  I just said that the documentation and examples don't do this.

  Again, you can LEARN from someone who's trying to help you, or you can reject my attempts to help you and fail to solve the problem.

>>> How could I access/or is there a variable with the name of the huntgroup?  There are only examples using sql :(.
>>   Follow the documentation.  Read the debug output.  That solves 99% of peoples problems.
> There is no docu about huntgroups and the huntgroup file!

  That's just not true.  If you do a google search (or even the wiki) for "FreeRADIUS huntgroups", you can easily find documentation.

  It's really simple.  You can either pay attention and fix the problem, or argue with me and don't fix it.  The choice is yours.

  Alan DeKok.




More information about the Freeradius-Users mailing list