Modify

Opened 7 years ago

Closed 5 years ago

Last modified 4 years ago

#9723 closed defect (fixed)

status->overview->network->active connections is always 0

Reported by: a.piesk@… Owned by: jow
Priority: low Milestone: Chaos Calmer 15.05
Component: luci Version: Backfire 10.03.1 RC5
Keywords: Cc:

Description

although i have 1500 connections, the counter is always zero.

Attachments (0)

Change History (7)

comment:1 Changed 7 years ago by jow

Hi, whats the output of these commands?

wc -l /proc/net/nf_conntrack

and

wc -l /proc/net/ip_conntrack

comment:2 Changed 7 years ago by jow

  • Owner set to jow
  • Status changed from new to accepted
  • Version changed from Trunk to Backfire 10.03.1 RC5

I just thought about the case when there is no conntracking, e.g. due to completely left out firewalling. I consider using netstat instead:

netstat -ntu 2>/dev/null | wc -l

comment:3 Changed 7 years ago by a.piesk@…

i forgot to mention the used firmware: brcm-2.4.

using brcm47xx i get a connection count but WLAN is unusable on my little WRT54GL, so i switched back to brcm-2.4.

i have no '/proc/net/nf_conntrack'. here's the requested output:

wc -l /proc/net/ip_conntrack

265 /proc/net/ip_conntrack

netstat -ntu 2>/dev/null | wc -l
12

comment:4 Changed 7 years ago by anonymous

i fixed the problem on my router by changing /usr/lib/lua/luci/view/admin_status/index.htm:

--- /tmp/index.htm	Tue Jul 12 22:46:24 2011
+++ /usr/lib/lua/luci/view/admin_status/index.htm	Mon Jul 18 21:18:21 2011
@@ -41,13 +41,15 @@
 		local _, _, memtotal, memcached, membuffers, memfree = luci.sys.sysinfo()
 
 		local conn_count = tonumber((
-			luci.sys.exec("wc -l /proc/net/nf_conntrack") or
-			luci.sys.exec("wc -l /proc/net/ip_conntrack") or
-			""):match("%d+")) or 0
+				luci.sys.exec("wc -l /proc/net/nf_conntrack") ):match("%d+"))
+				
+		if not conn_count then
+			conn_count = tonumber((                                                   
+				luci.sys.exec("wc -l /proc/net/ip_conntrack")):match("%d+"))
+		end
 
 		local conn_max = tonumber((
-			luci.sys.exec("sysctl net.nf_conntrack_max") or
-			luci.sys.exec("sysctl net.ipv4.netfilter.ip_conntrack_max") or
+			luci.sys.exec("sysctl -n net.ipv4.netfilter.ip_conntrack_max") or
 			""):match("%d+")) or 4096
 
 		local rv = {

comment:5 Changed 7 years ago by a.piesk@…

i'm no expert in lua, so there might be a better solution than mine but it seems to work. i also changed 'sysctl' to 'sysctl -n' to get the value without the key.

comment:6 Changed 5 years ago by jow

  • Resolution set to fixed
  • Status changed from accepted to closed

Should be fixed in current LuCI trunk and 0.11 branch

comment:7 Changed 4 years ago by jow

  • Milestone changed from Backfire 10.03.2 to Chaos Calmer (trunk)

Milestone Backfire 10.03.2 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.