aboutsummaryrefslogtreecommitdiffstats
path: root/collect-wireless-mac.capsman
diff options
context:
space:
mode:
Diffstat (limited to 'collect-wireless-mac.capsman')
-rw-r--r--collect-wireless-mac.capsman6
1 files changed, 6 insertions, 0 deletions
diff --git a/collect-wireless-mac.capsman b/collect-wireless-mac.capsman
index 0768a23..0b87bf7 100644
--- a/collect-wireless-mac.capsman
+++ b/collect-wireless-mac.capsman
@@ -25,6 +25,7 @@ $ScriptLock "collect-wireless-mac.capsman";
:local AccessList ([ / caps-man access-list find where mac-address=$Mac ]->0);
:if ([ :len $AccessList ] = 0) do={
:local Address "no dhcp lease";
+ :local DnsName "no dhcp lease";
:local HostName "no dhcp lease";
:local Lease [ / ip dhcp-server lease find where mac-address=$Mac ];
:if ([ :len $Lease ] > 0) do={
@@ -33,6 +34,10 @@ $ScriptLock "collect-wireless-mac.capsman";
:if ([ :len $HostName ] = 0) do={
:set HostName "no hostname";
}
+ :set DnsName [ / ip dns static get ([ find where address=$Address ]->0) name ];
+ :if ([ :len $DnsName ] = 0) do={
+ :set DnsName "no dns name";
+ }
}
:local RegEntry [ / caps-man registration-table find where mac-address=$Mac ];
:local Interface [ / caps-man registration-table get $RegEntry interface ];
@@ -52,6 +57,7 @@ $ScriptLock "collect-wireless-mac.capsman";
"Vendor: " . $Vendor . "\n" . \
"Hostname: " . $HostName . "\n" . \
"Address: " . $Address . "\n" . \
+ "DNS name: " . $DnsName . "\n" . \
"Date: " . $DateTime);
} else={
:local Comment [ / caps-man access-list get $AccessList comment ];