Re: [B.A.T.M.A.N.] No rebroadcast on mesh links

Marek Lindner
2016-03-30T02:15:30Z

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

On Wednesday, March 30, 2016 01:37:27 Roland Volkmann wrote:
> Let's have a look to the source code. The interesting part is function
> "static void batadv_send_outstanding_bcast_packet(struct work_struct
> *work)" in file "send.c". There you will find
>
> soft_iface = forw_packet->if_incoming->soft_iface;
> [...]
> /* rebroadcast packet */
> rcu_read_lock();
> list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
> if (hard_iface->soft_iface != soft_iface) /* !!! */
> continue;
>
> if (forw_packet->num_packets >= hard_iface->num_bcasts)
> continue;
>
> The if-Statement marked with /* !!! */ results in "true", if
> incoming-interface isn't identical to outgoing-interface. Because the
> patch is included after this line, it is relevant for resending
> broadcasts to the incoming interface only.

There seems to be a misunderstanding. With soft-interfaces batman-adv refers
to the logic interface created for each mesh (often: bat0, bat1, etc).
Consequently, the '!!!' marked if statement checks whether or not a given
hard-interface (read: wlan0, eth0, etc) belongs to the same soft-interface the
to be forwarded packet belongs to.

Hope that helps!

Cheers,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]