modules/admin-full: filter localhost<->localhost connections live connection graph
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 27 Nov 2012 14:16:42 +0000 (14:16 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 27 Nov 2012 14:16:42 +0000 (14:16 +0000)
modules/admin-full/luasrc/view/admin_status/connections.htm
modules/admin-full/src/luci-bwc.c

index 9c9eb01c966408682693eee45b5ed1caa9a4f992..6525391aad97fbc6f5d52f777a9290652b7f5009 100644 (file)
@@ -8,8 +8,6 @@ You may obtain a copy of the License at
 
        http://www.apache.org/licenses/LICENSE-2.0
 
-$Id$
-
 -%>
 
 <%+header%>
@@ -161,6 +159,10 @@ $Id$
                                                for (var i = 0; i < conn.length; i++)
                                                {
                                                        var c  = conn[i];
+
+                                                       if (c.src == '127.0.0.1' && c.dst == '127.0.0.1')
+                                                               continue;
+
                                                        var tr = conn_table.rows[0].parentNode.insertRow(-1);
                                                            tr.className = 'cbi-section-table-row cbi-rowstyle-' + (1 + (i % 2));
 
index 52e25e6f7884048fc872b3c76e9b199f103cad6e..1a4f510d7812162a2f2e8bf0ab9a25db1e9ecbb1 100644 (file)
@@ -536,6 +536,10 @@ static int run_daemon(void)
                                if (strstr(line, "TIME_WAIT"))
                                        continue;
 
+                               if (strstr(line, "src=127.0.0.1 ") &&
+                                   strstr(line, "dst=127.0.0.1 "))
+                                       continue;
+
                                if (sscanf(line, "%*s %*d %s", ifname) || sscanf(line, "%s %*d", ifname))
                                {
                                        if (!strcmp(ifname, "tcp"))