Removing spaces from User-Name

Daniel Ryšlink ryslink at dialtelecom.cz
Wed Nov 29 13:03:03 UTC 2023


Hello,

There are NAS devices (Mikrotik) in our network that generate incorrect 
User-Names in Access-Request packets containing spaces - example:

User-Name = "MK-TRA eth 0/9:269.ether8"

These packets are refused and invalid by the radius server:

Invalid user (Rejected: User-Name contains whitespace): [MK-TRA eth 
0/9:269.ether8]

The question is - is there a way/how to do a preprocessing on the radius 
server to remove the whitespace characters from the User-Name? I know 
that the most correct solution would be to generate valid radius packets 
on the client side, but I already looked into the RouterOS documentation 
and there seem to be no fine control on how the packet is generated 
(User-Name is obviously constructed from configuration items, separated 
by said whitespaces).

Any practical advice would be greatly appreciated, thank you very much 
in advance.

-- 
Regards,
Daniel Ryšlink



More information about the Freeradius-Users mailing list