On Wed, Jun 12, 2024 at 11:39:44PM +0200, Linus Lüssing wrote:
So far, if we wanted to bridge VLAN tagged frames into the mesh one would need to manually create an according VLAN interface on top of bat0 first, to trigger batman-adv to create the according structures for a VID.
With this change the VLAN from bridged-in clients is now automatically detected and added to the translation table on the fly.
Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue
Just wanted to add two more remarks / oddities I was stumbling over when working on and testing this and reading the code. Which might be something worth additional patches in the future.
Minor thing, in the following case I would have expected the P/NOPURGE flag to be added, but it wasn't:
``` root@linus-work:/# batctl tl [B.A.T.M.A.N. adv 2024.1-10-g2ee1b45a-dirty, MainIF/MAC: ens3/02:04:64:a4:39:c1 (bat0/02:11:00:00:00:01 BATMAN_V), TTVN: 12] Client VID Flags Last seen (CRC ) 02:11:00:00:00:01 -1 [.P....] 0.000 (0x1350f3f4) 02:11:00:00:00:02 -1 [......] 3.788 (0x1350f3f4) root@linus-work:/# ip link set dev bat0 addr 02:11:00:00:00:02 root@linus-work:/# batctl tl [B.A.T.M.A.N. adv 2024.1-10-g2ee1b45a-dirty, MainIF/MAC: ens3/02:04:64:a4:39:c1 (bat0/02:11:00:00:00:02 BATMAN_V), TTVN: 13] Client VID Flags Last seen (CRC ) 02:11:00:00:00:02 -1 [......] 1.872 (0x8d84de4b) root@linus-work:/# ```
Don't see a functional issue right now though. If it were timing out and deleted and then a frame is sent from bat0 then it would be readded with the P/NOPURGE flag.
Secondly, discovered this yesterday when trying to add multiple VIDs quickly like this:
``` for i in `seq 3 8`; do mz bat0 \ -a 02:33:02:34:00:01 \ -b bcast "81:00 00:0$i 08:00 ca:fe:ca:fe" sleep 1 done ```
Then this won't work. Whenever adding a new VID broadcast traffic seems to stale for 30 seconds from this node due to the "num requests in flight" check in batadv_bla_tx(): https://git.open-mesh.org/batman-adv.git/blob/36cfdc4401412d5a00231b1fd65a95...
So repeating that command every 30 seconds will add one more VID every time. Then after 6x 30 seconds you could use all VIDs as expected, as long as they don't time out. With "batctl bl 0" no such delay + broadcast filtering happens and VIDs would be usable immediately with that loop for the mausezahn command. -> Might make sense to make bat_priv->bla.num_requests per VLAN in the future instead? (would that make sense? or am I missing something else or an easier solution?)
Regards, Linus