Access-Accept does not "see" the attribute defined in the dictionary file
Hello, I've built the FR (master branch) on raspberry pi and I'm trying to run it with a custom defined attribute in Access-Accept. I have added this attribute at the end of */usr/local/etc/raddb/dictionary* as follows: *ATTRIBUTE TEST-ATTRIBUTE-1.2.3 3011 string* This is the only uncommented line in the dictionary file. Then in */usr/local/etc/raddb/sites-enabled/default* inside the *send Access-Accept* block, I have added a very simple code: *send Access-Accept{* *...* *if (&session-state:TEST-ATTRIBUTE-1.2.3) {* * update {* * &Url-Data :="%{session-state:TEST-ATTRIBUTE-1.2.3}"* * }* * rest* *}* *...* *}* Then after running it with *sudo /usr/local/sbin/radiusd -X*, I'm getting the following error: *...* *compiling - send Access-Accept {...}* */usr/local/etc/raddb/sites-enabled/default[1033]: Failed resolving undefined attribute: Unknown protocol 'TEST-ATTRIBUTE-1'* */usr/local/etc/raddb/sites-enabled/default[1033]: Failed to parse "if" subsection* */usr/local/etc/raddb/sites-enabled/default[988]: Failed compiling 'send Access-Accept { ... }' section* */usr/local/etc/raddb/sites-enabled/default[80]: Could not load virtual server "default".* Could you please help me with this? what am I missing? Thank you in advance,
On Nov 21, 2018, at 10:49 AM, Vafa Andalibi <vafandal@iu.edu> wrote:
I've built the FR (master branch)
Please don't use the "master" branch unless you are VERY familiar with RADIUS. v4 is in heavy development, and may not even work from day to day. Why are you using v4?
on raspberry pi and I'm trying to run it with a custom defined attribute in Access-Accept. I have added this attribute at the end of */usr/local/etc/raddb/dictionary* as follows:
*ATTRIBUTE TEST-ATTRIBUTE-1.2.3 3011 string*
There's no need to add ** around everything. Just paste the text. And, why are you adding that attribute? What is it for?
This is the only uncommented line in the dictionary file. Then in */usr/local/etc/raddb/sites-enabled/default* inside the *send Access-Accept* block, I have added a very simple code:
*send Access-Accept{* *...* *if (&session-state:TEST-ATTRIBUTE-1.2.3) {* * update {* * &Url-Data :="%{session-state:TEST-ATTRIBUTE-1.2.3}"* * }* * rest* *}* *...* *}*
Then after running it with *sudo /usr/local/sbin/radiusd -X*, I'm getting the following error:
*...*
*compiling - send Access-Accept {...}* */usr/local/etc/raddb/sites-enabled/default[1033]: Failed resolving undefined attribute: Unknown protocol 'TEST-ATTRIBUTE-1'*
Well, that seems simple enough. The name is getting truncated. Don't use "." in an attribute name. Or, use v3. Alan DeKok.
participants (2)
-
Alan DeKok -
Vafa Andalibi