• Linus Lüssing's avatar
    batman-adv: mcast: detect, distribute and maintain multicast router presence · 61caf3d1
    Linus Lüssing authored
    To be able to apply our group aware multicast optimizations to packets
    with a scope greater than link-local we need to not only keep track of
    multicast listeners but also multicast routers.
    
    With this patch a node detects the presence of multicast routers on
    its segment by checking if
    /proc/sys/net/ipv{4,6}/conf/<bat0|br0(bat)>/mc_forwarding is set for one
    thing. This option is enabled by multicast routing daemons and needed
    for the kernel's multicast routing tables to receive and route packets.
    
    For another thing if a bridge is configured on top of bat0 then the
    presence of an IPv6 multicast router behind this bridge is currently
    detected by checking for an IPv6 multicast "All Routers Address"
    (ff02::2). This should later be replaced by querying the bridge, which
    performs proper, RFC4286 compliant Multicast Router Discovery (our
    simplified approach includes more hosts than necessary, most notably
    not just multicast routers but also unicast ones and is not applicable
    for IPv4).
    
    If no multicast router is detected then this is signalized via the new
    BATADV_MCAST_WANT_NO_RTR4 and BATADV_MCAST_WANT_NO_RTR6
    multicast tvlv flags.
    Signed-off-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
    Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
    Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
    61caf3d1
originator.c 41.7 KB