#40 Remote/local IP address macros in IPFW related RADIUS VSAs


This patch adds two macros which enable the use of the local and remote IP address of the link to be used in generating IPFW rules with the RADIUS VSAs mpd-table, mpd-table-static, mpd-rule.

The patch replaces %a1 with the remote IP address, and %a2 with the local IP address. Thus, we can tell MPD for example to put the remote IP address in a table specified by the RADIUS VSA. Sample radius entry, which will put the peer IP address in table 1(+the default offset defined):
mpd-table += 1=%a1

This is very useful for mass shaping different service types, etc.

The current function for parsing macros searches for a %+char+digit, so, in order to not parse each line again, the %a1 and %a2 macros were chosen, though not so descriptive.

Hope that gets included in the official MPD release, if you need any change or suggest another macro names or sth else, please drop me a line at root--at--net1--dot--cc


  • Patch - %a1 and %a2 macros in RADIUS VSAs

  • Popov Maxim
    Popov Maxim

    Cool ! I hope they will include such a functionality in the upcoming release ....

  • Commited. Thanks.

    • status: open --> closed
    • assigned_to: Dmitry S. Luhtionov
    • Group: --> kqueue