aland at deployingradius.com
Mon Nov 16 14:55:22 CET 2015
For people watching github... there's been a flurry of changes to the code in the last few weeks. This is all necessary for future expansion of the server.
Arran has updated the way the dictionary API handles attributes. Previously, it assumed that all attributes could be packet into a 32-bit integer... via a terrible packing scheme. The idea at the time was that you could address any attribute at compile-time via a magic number.
That functionality was never used. Worse, it prevented us from having TLVs nested more than 4 layers, and made other work harder. So it's been removed.
Attributes can now be nested to almost any depth. After about 20, though, it starts getting silly.
As a result of the previous change, the RADIUS encoder / decoder was updated. The decoder didn't change much, as it was already well abstracted. The encoder was almost completely re-written. It's now *much* simpler and easier to understand.
What made this possible was the tests in src/tests. And the Coverity / clang scans. So we're sure that the new code works, and has minimal problems.
I've been working on cleaning up the architecture of the server. Previously, the initialization code was scattered across multiple files, and wasn't very clear. If you now read radiusd.c, it's pretty clear what gets initialized, and in what order.
There is more to do, of course. But the goal is a better structure which is easier to maintain, and easier to extend.
More information about the Freeradius-Devel