On Fri, Dec 18, 2015 at 09:52:20PM +0000, Joel Bergmark wrote:
Thank you very very very much Matthew, this made my day! Also thanks to you others trying to help a network guy with this stuff.
You're welcome. Alan is completely right - it's only simple logic. The key is to work out exactly what you want to do, then think the logic for that, then program it. Which is why we find it hard when people post questions with very unclear requirements as we're all stuck at the first step.
Your solution at the end helped me greatly and it looks like its working as necessary :-)
Hopefully you've got the basics that you can extend. Building up from small components can help. It's harder for me; I've been programming for over 25 years so this stuff just makes sense. I can see it's not so easy when you're starting from scratch. But without a policy configuration language FreeRADIUS would be much less powerful. Have a read of the unlang documentation, but really "if/elsif/else" are all you need for the vast majority of things. Though switch/case/default can be very useful in a few cases. http://freeradius.org/radiusd/man/unlang.html http://networkradius.com/doc/current/unlang/keywords.html Matthew -- Matthew Newton, Ph.D. <mcn4@le.ac.uk> Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>