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:
Johannes Kimmel 2021-01-21 12:34:02 +01:00
parent dd69724837
commit 27e074b1ea
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-network
PKG_RELEASE:=31
PKG_RELEASE:=32
include $(INCLUDE_DIR)/package.mk

View File

@ -12,7 +12,7 @@ debug "Collecting information about connected clients"
client_count=0
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
cc=$(bridge fdb show br "$MESH_INTERFACE" brport "$clientif" | grep -v self | grep -v permanent -c)
client_count=$((client_count + cc))