dhcp integrated in rlm_sql
Stephen R. van den Berg
srb at cuci.nl
Tue Aug 23 15:18:36 CEST 2011
Alan DeKok wrote:
> This can't be added... for one, it removes the #ifdef WITH_COA stuff.
> There's no reason for that.
Only in the definition of the "jumptable". This in order to ensure that
the number of entries there doesn't shift up and down with WITH_COA
being present or not.
> It adds a RLM_COMPONENT_DHCP which is
>nice... but has some issues.
> The RLM_COMPONENT_DHCP code is *not* conditionally compiled. So it's
>still there even if you don't build with DHCP.
Yes, on purpose, to keep the "binary" interface the same. It's extremely
messy trying to debug compilation issues when the modules are not all
properly rebuilt (yes, there are issues with the Makefiles too).
The components being callable or not is solved elsewhere.
> Adding RLM_COMPONENT_DHCP means that *all* of the modules need a DHCP
>component. That's why the modules have entries for the COA code. It
>initializes the array entries so that the CoA entry exist if CoA
>enabled. Right now, most modules don't have a DHCP entry. This means
>that if someone accidentally lists a module in a DHCP section, the
>"modcall.c" code will walk off of the end of the module_t array.
Didn't I add null values in every module that didn't have it?
Hmmm..., maybe I didn't. What if I fixed this?
> The real way to do this is to change the code to allow it to
>dynamically register callbacks. That requires a lot more work,
Yes, sounds like more work than I bargained for. Is the fix mentioned
above enough to get it in?
> For now, the DHCP code works by overloading the "post-auth" section.
>It's ugly, but it pretty much works.
Well, I tried it, but in combination with SQL it sort of didn't work.
Was I too soon to judge?
More information about the Freeradius-Devel