luci-mod-status: don't drop lines with negated addresses
authorJo-Philipp Wich <jo@mein.io>
Tue, 18 Feb 2020 12:58:52 +0000 (13:58 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 4 Mar 2020 07:50:21 +0000 (08:50 +0100)
Fixes: #3642
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c3b07fb3586500afb6395bef6fe05ac8ae008df7)

modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js

index 04abcba9d05794e897e8496e6add8abc1a29e669..fc7c7cdd12ef5825794af05f901464a359eab152 100644 (file)
@@ -130,7 +130,7 @@ return L.view.extend({
                        else if (m[1].match(/^num /)) {
                                continue;
                        }
-                       else if ((m2 = m[1].match(/^(\d+) +(\d+) +(\d+) +(.*?) +(\S+) +(\S*) +(\S+) +(\S+) +([a-f0-9:.]+(?:\/[a-f0-9:.]+)?) +([a-f0-9:.]+(?:\/[a-f0-9:.]+)?) +(.+)$/)) !== null) {
+                       else if ((m2 = m[1].match(/^(\d+) +(\d+) +(\d+) +(.*?) +(\S+) +(\S*) +(\S+) +(\S+) +(!?[a-f0-9:.]+(?:\/[a-f0-9:.]+)?) +(!?[a-f0-9:.]+(?:\/[a-f0-9:.]+)?) +(.+)$/)) !== null) {
                                var num = +m2[1],
                                    pkts = +m2[2],
                                    bytes = +m2[3],