From c6c6e02a6466994329a65fbd31cb3d8305e13181 Mon Sep 17 00:00:00 2001
From: root <root@frank.tg14.gathering.org>
Date: Mon, 14 Apr 2014 02:21:52 +0200
Subject: Only use officially polled ports for network traffic maps.

---
 sql/nms.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'sql/nms.sql')

diff --git a/sql/nms.sql b/sql/nms.sql
index 45d9e7b..002ae6b 100644
--- a/sql/nms.sql
+++ b/sql/nms.sql
@@ -105,7 +105,7 @@ BEGIN
         num_entries := 0;
         last_poll.switch := -1;
 
-        FOR poll IN select * from polls where time >= now() - '15 minutes'::interval and time < now() order by switch,port,time LOOP
+        FOR poll IN select * from polls where time >= now() - '15 minutes'::interval and time < now() and official_port order by switch,port,time LOOP
                 IF poll.switch <> last_poll.switch OR poll.port <> last_poll.port THEN
                         IF num_entries >= 2 THEN
                                 timediff := EXTRACT(epoch from last_poll.time - first_poll.time);
-- 
cgit v1.2.3

