Ok basically i've run into a problem with my planning to use MT as a BNG.
Plan was DHCP sends Opt-82 and Mac to radius, radius authenticate the opt-82 is an enabled customer sends back IP+Speeds for Simple queues for client.
This works fine, except for the fact if customer plugs in a switch to his DSL/GPON he then will get multiple ip's and each ip will get a clean simple queue of his speed (so if he was supposed to have 4mbit, he would have 4mbit per device on that switch behind the gpon opt-82)
So what I wanted to do was have Radius send back the ip with Option-82 as it's addresslist name, and simplequeue parameters
And then have a mikrotik script that goes through on the DHCP-Lease and converts the simple queue to a PCQ using the newly created addresslist (and generate the mangle/pcq if it wasnt previously created.
But holy crap am i lost in how to even start programming this... Radius returning the addresslist and simple queue is easy, but converting the SImple queue to PCQ "if needed" and performing cleanup when the lease expires, or logs in elsewhere, i just dont know how to handle.
Anyone got a few to help me out.