forked from freifunk-franken/firmware
fff-network: exclude vxmesh fdb entries in client count
This avoids counting a single client multiple times. Neighbours behind the vxlan device are actually local to another router and should only be counted there. Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
This commit is contained in:
parent
dd69724837
commit
27e074b1ea
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-network
|
PKG_NAME:=fff-network
|
||||||
PKG_RELEASE:=31
|
PKG_RELEASE:=32
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ debug "Collecting information about connected clients"
|
||||||
|
|
||||||
client_count=0
|
client_count=0
|
||||||
dataclient=""
|
dataclient=""
|
||||||
CLIENT_INTERFACES=$(ls "/sys/class/net/$MESH_INTERFACE/brif" | grep -v '^bat')
|
CLIENT_INTERFACES=$(ls "/sys/class/net/$MESH_INTERFACE/brif" | grep -v -e '^bat' -v -e '^vxmesh')
|
||||||
for clientif in ${CLIENT_INTERFACES}; do
|
for clientif in ${CLIENT_INTERFACES}; do
|
||||||
cc=$(bridge fdb show br "$MESH_INTERFACE" brport "$clientif" | grep -v self | grep -v permanent -c)
|
cc=$(bridge fdb show br "$MESH_INTERFACE" brport "$clientif" | grep -v self | grep -v permanent -c)
|
||||||
client_count=$((client_count + cc))
|
client_count=$((client_count + cc))
|
||||||
|
|
Loading…
Reference in New Issue