kernel_optimize_test/net/batman-adv
Linus Lüssing 74c09b7275 batman-adv: mcast: fix duplicate mcast packets in BLA backbone from mesh
Scenario:
* Multicast frame send from mesh to a BLA backbone (multiple nodes
  with their bat0 bridged together, with BLA enabled)

Issue:
* BLA backbone nodes receive the frame multiple times on bat0,
  once from mesh->bat0 and once from each backbone_gw from LAN

For unicast, a node will send only to the best backbone gateway
according to the TQ. However for multicast we currently cannot determine
if multiple destination nodes share the same backbone if they don't share
the same backbone with us. So we need to keep sending the unicasts to
all backbone gateways and let the backbone gateways decide which one
will forward the frame. We can use the CLAIM mechanism to make this
decision.

One catch: The batman-adv gateway feature for DHCP packets potentially
sends multicast packets in the same batman-adv unicast header as the
multicast optimizations code. And we are not allowed to drop those even
if we did not claim the source address of the sender, as for such
packets there is only this one multicast-in-unicast packet.

How can we distinguish the two cases?

The gateway feature uses a batman-adv unicast 4 address header. While
the multicast-to-unicasts feature uses a simple, 3 address batman-adv
unicast header. So let's use this to distinguish.

Fixes: fe2da6ff27 ("batman-adv: check incoming packet type for bla")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
2020-09-15 10:05:24 +02:00
..
bat_algo.c
bat_algo.h
bat_iv_ogm.c
bat_iv_ogm.h
bat_v_elp.c
bat_v_elp.h
bat_v_ogm.c
bat_v_ogm.h
bat_v.c
bat_v.h
bitarray.c
bitarray.h
bridge_loop_avoidance.c batman-adv: mcast: fix duplicate mcast packets in BLA backbone from mesh 2020-09-15 10:05:24 +02:00
bridge_loop_avoidance.h batman-adv: mcast: fix duplicate mcast packets in BLA backbone from mesh 2020-09-15 10:05:24 +02:00
debugfs.c
debugfs.h
distributed-arp-table.c
distributed-arp-table.h
fragmentation.c
fragmentation.h
gateway_client.c
gateway_client.h
gateway_common.c
gateway_common.h
hard-interface.c
hard-interface.h
hash.c
hash.h
icmp_socket.c
icmp_socket.h
Kconfig
log.c
log.h
main.c
main.h
Makefile
multicast.c batman-adv: mcast: fix duplicate mcast packets in BLA backbone from LAN 2020-09-15 10:05:24 +02:00
multicast.h batman-adv: mcast: fix duplicate mcast packets in BLA backbone from LAN 2020-09-15 10:05:24 +02:00
netlink.c
netlink.h
network-coding.c
network-coding.h
originator.c
originator.h
routing.c batman-adv: mcast/TT: fix wrongly dropped or rerouted packets 2020-09-05 08:45:46 +02:00
routing.h
send.c
send.h
soft-interface.c batman-adv: mcast: fix duplicate mcast packets in BLA backbone from mesh 2020-09-15 10:05:24 +02:00
soft-interface.h
sysfs.c
sysfs.h
tp_meter.c
tp_meter.h
trace.c
trace.h
translation-table.c
translation-table.h
tvlv.c
tvlv.h
types.h