From: Eric Luehrsen Date: Sat, 11 Feb 2017 02:38:00 +0000 (-0500) Subject: luci: ignore '::1' in realtime connections X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=refs%2Fpull%2F1000%2Fhead;p=project%2Fluci.git luci: ignore '::1' in realtime connections luci ignores only 127.0.0.1 in real time connections. The dnsmasq.init script sets up resolv.conf(s) as such. With alternate DNS servers configured 'localhost' will resolve to '127.0.0.1' or '::1'. The connections graph will spam itself. openwrt/luci#996 Signed-off-by: Eric Luehrsen --- diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm index 0b2e52e059..b7ebc41451 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm @@ -153,7 +153,8 @@ { var c = conn[i]; - if (c.src == '127.0.0.1' && c.dst == '127.0.0.1') + if ((c.src == '127.0.0.1' && c.dst == '127.0.0.1') + || (c.src == '::1' && c.dst == '::1')) continue; var tr = conn_table.rows[0].parentNode.insertRow(-1); diff --git a/modules/luci-mod-admin-full/src/luci-bwc.c b/modules/luci-mod-admin-full/src/luci-bwc.c index 63668d42b3..8ddd91727a 100644 --- a/modules/luci-mod-admin-full/src/luci-bwc.c +++ b/modules/luci-mod-admin-full/src/luci-bwc.c @@ -521,8 +521,8 @@ 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 ")) + if ((strstr(line, "src=127.0.0.1 ") && strstr(line, "dst=127.0.0.1 ")) + || (strstr(line, "src=::1 ") && strstr(line, "dst=::1 "))) continue; if (sscanf(line, "%*s %*d %s", ifname) || sscanf(line, "%s %*d", ifname))