Project

General

Profile

Actions

Bug #430

open

BLA: Externally induced, locally allocated backbone_gw's are never freed

Added by Linus Lüssing 24 days ago. Updated 24 days ago.

Status:
New
Priority:
Normal
Target version:
-
Start date:
11/28/2024
Due date:
% Done:

0%

Estimated time:

Description

The reproducing script in https://www.open-mesh.org/issues/429 also shows a potential, small memory leak. In the sense that an external, bridged-in host can trigger the allocation of memory on its batman-adv node that is never freed. Even after this bridged-in host has vanished for a long time.

With the bla-vlan-test.sh script in that ticket, every 30 seconds a new, local backbone_gw with (orig,VID+1) is allocated inside batman-adv. In theory for up to every possible VLAN ID. Which will never time out and will therefore never be free()'d.

Explanation:

The timeout of these local, own, per VID backbone_gw entries will be reset every 10 seconds in batadv_bla_periodic_work() here. Therefore they will never reach their 60 seconds timeout and will therefore never be freed after the periodic batadv_bla_purge_backbone_gw() check here.

Note: The own backbone_gw's are not visible through batctl, they are explicitly excluded from being displayed via the BATADV_ATTR_BLA_OWN netlink attribute check in batctl.

Suggested Change?

Simply remove the last seen update in batadv_bla_periodic_work()? Or does it have some other use somewhere else?

Actions

Also available in: Atom PDF