From 50a9e3fcb3e8e6f3ec13eebe1da8df7bdf7af45c Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Wed, 23 Mar 2016 10:53:45 +0100 Subject: NMS: Bump location and placement --- web/nms.gathering.org/api/public/location | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/nms.gathering.org/api/public') diff --git a/web/nms.gathering.org/api/public/location b/web/nms.gathering.org/api/public/location index 6c25ab9..b940007 100755 --- a/web/nms.gathering.org/api/public/location +++ b/web/nms.gathering.org/api/public/location @@ -8,7 +8,7 @@ use warnings; use Data::Dumper; #my $query = $nms::web::dbh->prepare("select * from switches where '185.110.150.7' << subnet4"); -my $query = $nms::web::dbh->prepare("select * from switches where ? << subnet4"); +my $query = $nms::web::dbh->prepare("select * from switches where ? << subnet4 or ? << subnet6"); print "Cache-Control: max-age=0"; print "Content-Type: text/html"; @@ -20,7 +20,7 @@ print "\n\n"; my @xff = split(",",$ENV{HTTP_X_FORWARDED_FOR}); my $addr = $xff[0] // $ENV{REMOTE_ADDR}; -$query->execute($addr); +$query->execute($addr,$addr); # add start html: header + body etc. print " -- cgit v1.2.3