Modifying incoming packets with unlang

David le Roux david.leroux at miller.co.uk
Mon Mar 28 09:49:03 UTC 2022


Hello,

I am migrating from an old raddb instance and one of the changes is that freeradius no longer uses the attr_rewrite module and instead relies on unlang. We use this module to change the packet requests and I have scoured the documentation but have made no headway in translating the following two commands, especially in how to deal with packets. Could I get some pointers by any unlang experts, I'm really scratching my head and this is all new to me. Thanks

=============================

        attr_rewrite copyusertocertcn {
                attribute = Cert-CN
                new_attribute = yes
                searchfor = ""
                searchin = packet
                replacewith = "%{User-Name}"
        }

         attr_rewrite removehostportion {
                attribute = Cert-CN
                searchin = packet
                searchfor = "(host/)(.*)"
                replacewith = "%{2}"
                ignore_case = no
                new_attribute = no
        }

=============================


Kind regards,

David le Roux




________________________________


Miller Homes Limited Registered in Scotland - SC255429
2 Lochside View, Edinburgh Park, Edinburgh, EH12 9DH

Disclaimer: The Information in this e-mail is confidential and for use by the addressee(s) only. It may also be privileged. If you are not the intended recipient please notify us immediately on +44 (0) 870 336 5000 and delete the message from your computer: you may not copy or forward it, or use or disclose its contents to any other person. We do not accept any liability or responsibility for: (1) changes made to this email after it was sent, or (2) viruses transmitted through this email or any attachment.

Miller Homes Limited <https://www.millerhomes.co.uk>



More information about the Freeradius-Users mailing list