MCN: I tried it before. But looks its only can set string not integer (ex: %{%{attr4}:--3} its showing error when restart radius service.). So can I set the -3 by using %{%{attr4}:-'-3'} or not? 星たちよ 汝の命短き眷族の望みな聞くがよい 我らの望み それほ 汝の本將ちゆく末な看取るニと -------------《アーヴによる人類帝國》國歌の一節よリ Matthew Newton <mcn@freeradius.org> 於 2021年2月13日 週六 下午5:46寫道:
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 - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html