aboutsummaryrefslogtreecommitdiffstats
path: root/clients/ping.pl
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-03-17 21:42:19 +0000
committerKristian Lyngstol <kly@kly.no>2016-03-17 21:42:19 +0000
commit2a5cbfe5fa9930b3ac72a618e956a14878e20043 (patch)
tree5f37bc98ed2f3db7204a6da02a9ed28c176e3d79 /clients/ping.pl
parent8eb1b43ce136e808fbd90aeb11eecd03eaa821d8 (diff)
NMS: Strip netmask from management ips where relevant
Diffstat (limited to 'clients/ping.pl')
-rwxr-xr-xclients/ping.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/ping.pl b/clients/ping.pl
index 47119f1..27aa878 100755
--- a/clients/ping.pl
+++ b/clients/ping.pl
@@ -15,7 +15,7 @@ my $dbh = nms::db_connect();
$dbh->{AutoCommit} = 0;
$dbh->{RaiseError} = 1;
-my $q = $dbh->prepare("SELECT switch,ip,secondary_ip FROM switches WHERE ip is not null ORDER BY random()");
+my $q = $dbh->prepare("SELECT switch,host(ip) as ip,host(secondary_ip) as secondary_ip FROM switches WHERE ip is not null ORDER BY random()");
my $lq = $dbh->prepare("SELECT linknet,addr1,addr2 FROM linknets");
while (1) {