home_server type = auth+acct+coa in the same port?

Jorge Pereira jpereiran at gmail.com
Fri May 8 17:30:29 CEST 2015


   I guess that i got it your idea... because today we have the
src/main/command.c that have a
static 'options' like the string "auth+acct" (you can't invert the order!)
that set a static defines.

I think that we can change for bit-wise matchs... like:

   <pseudo imaginary code>
   for (t=types; t=parser_ninja_get("type"); t++)
       if (t == "acct")
           type_value |= HOME_TYPE_ACCT;
       else if (t == "auth")
           type_value |= HOME_TYPE_AUTH;
       else if (t == "coa")
           type_value |= HOME_TYPE_COA


   // And in the places when need to match...

   if (type_value & HOME_TYPE_ACCT)
   else if (type_value & HOME_TYPE_COA)

   </pseudo imaginary code>

something like that? btw... I have looked around, looks like a hard work! :)

Jorge Pereira

On Fri, May 8, 2015 at 12:14 PM, Alan DeKok <aland at deployingradius.com>

> On May 8, 2015, at 11:08 AM, Jorge Pereira <jpereiran at gmail.com> wrote:
> > The reason of my question is because the product RedBack (Nokia) has this
> > capability.
>   It is very much non-standard.
> > And i found in the latest release notes from 3.0.5 the below
> > point.
> >
> >   - CoA and Disconnect packets can now be sent to a specific home server
> >   by setting control:Packet-Dst-IP-Address and (optionally)
> >   control:Packet-Dst-Port.
> >
> > I really would like to have this and I intend to add this support. what
> do
> > you think about that?
>   Sure.  The main difficulty is in parsing the config, and verifying that
> the destination is, in fact, capable of handling the packet being sent.
>   To be honest, the best solution would be to fix the config so that "type
> = auth+acct" is disallowed.  Instead, just allow multiple "type" fields.
> And change the home_server definition to have an array of allowed types.
>   This means it's easy to understand, easy to parse, and easy to extend in
> the future.
>   And be sure that the changes are backwards compatible. :)
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html

More information about the Freeradius-Users mailing list