modules/admin-full: don't count TIME_WAIT connections in luci-bwc
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 13 Mar 2011 17:52:03 +0000 (17:52 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 13 Mar 2011 17:52:03 +0000 (17:52 +0000)
modules/admin-full/src/luci-bwc.c

index 9f1b420adfb1a23ef966540fa73e057cdb3add1e..4067c577afc8d72074e2b1bcd198b50589092bd0 100644 (file)
@@ -344,6 +344,9 @@ static int run_daemon(int nofork)
 
                        while (fgets(line, sizeof(line), info))
                        {
+                               if (strstr(line, "TIME_WAIT"))
+                                       continue;
+
                                if (sscanf(line, "%*s %*d %s", ifname) || sscanf(line, "%s %*d", ifname))
                                {
                                        if (!strcmp(ifname, "tcp"))