Hi,
I try to add queues from address list and add to comment host name from dns.
To add queues from address list works fine. Problem is to add HostName from DNS.
:local hostip
:local list
:local testvalue
:local hostdns
:log info "******************** starting - address list queue create ********************"
:foreach i in=[/ip firewall address-list find list=ipLAN] do={
:set list ([/ip firewall address-list get $i list] )
:set hostip ([/ip firewall address-list get $i address] )
:set testvalue [/queue simple find name=$hostip]
:if ([:len $testvalue] <= 0) do={
:if ($list = "ipLAN") do={
:set hostdns [/ip dns static find name where address=$hostip]
/queue simple add name=$hostip comment="ipLAN $hostdns" target=$hostip queue=default/default total-queue=default
} else={
}
} else={
}
}
My problem is that line:
:set hostdns [/ip dns static find name where address=$hostip]
Can anybody help me ?
Best Regards,