13 Feb
2021
13 Feb
'21
4:45 a.m.
On 13/02/2021 05:44, StreitLeak wrote:
so the real query is "insert into radacct ( attr1.attr2.attr3,attr4) values (' Mon Feb 8 15:15:11 2021\n ', '65535','1','' ) As you can see . the Attr4 is missing in Request Packet. And it cause the query failed. So I need to set some rules to avoid it. But I can't understand the foreach how to check each VSA attributes. Or any easily way to avoid the missing attributes.
You can use conditional expansions e.g. %{%{attr4}:-0} See https://networkradius.com/doc/current/unlang/xlat_condition.html There are plenty of examples of this in the default config, especially in the SQL queries. -- Matthew