New state machine in the server core.
Alan DeKok
aland at deployingradius.com
Wed Apr 13 10:12:34 CEST 2011
I've just pushed a new state machine to the server core. For people
doing "git pull", this means editing src/main/Makefile, and changing
"event.c" to "process.c". Or, just re-run "configure"
The new state machine is about the same amount of code as the old one.
The difference is that it's conceptually much simpler. It has all of
the functionality of the old one, and hopefully none of the bugs.
The old state machine was an inter-connected mess that was getting to
be impossible to extend or debug. The new one is much, much, better.
I've attached some SVG diagrams of the state machines, taken from an
automated analysis of the code. "event.svg" is the old one.
"process.svg" is the new one. You'll note that "process.svg" doesn't
look a lot simpler...
So "process-simplified.svg" removes the "book-keeping" functions,
along with the proxy and CoA functions. The result is a state machine
that handles authentication / accounting / coa requests, processes them,
and replies. That state machine is much simpler.
Please test it, and see what you think. I've done a number of tests
with all packet types, proxying, etc. I think that the functionality is
identical to the old one, or sometimes even better.
It also has the ability to debug the internal state machine. Define a
flag DEBUG_STATE_MACHINE, and it will then print out every state
transition that a request goes through. It's valuable for understanding
how it all works.
Alan DeKok.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: event.svg
Type: image/svg+xml
Size: 65304 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20110413/5f3295d3/attachment.svg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: process.svg
Type: image/svg+xml
Size: 63651 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20110413/5f3295d3/attachment-0001.svg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: process-simplified.svg
Type: image/svg+xml
Size: 10292 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20110413/5f3295d3/attachment-0002.svg>
More information about the Freeradius-Devel
mailing list