Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial multicast filtering support for bridge #309

Merged
merged 22 commits into from
Mar 7, 2024
Merged

Commits on Mar 7, 2024

  1. confd: initial multicast filtering support for bridge model

    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    3dc386b View commit details
    Browse the repository at this point in the history
  2. confd: disable bridge's dumpster diving when vlan filtering

    With VLAN filtering on a bridge we cannot use the mcast_query_use_ifaddr
    mechanism.  This because even if the bridge may have an address it is
    likely not on the same subnet as that of the VLAN, and the multicast
    code in the kernel does not look at VLAN interfaecs on top of bridge
    for a relevant adddress.
    
    For these cases we have to use querierd, or a multicast router.
    
    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    4478ccd View commit details
    Browse the repository at this point in the history
  3. confd: improve debug messages, include ifname everywhere

    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    60aafd6 View commit details
    Browse the repository at this point in the history
  4. confd: add support for bridge port flooding control

    This patch adds BUM flooding control per port.
    
    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    181d184 View commit details
    Browse the repository at this point in the history
  5. confd: initial mdb support, per bridge and per VLAN

    Note, no VLAN id, or other VLAN specific information is contained in the
    MDB entries, only forwarding information and per-port state.
    
    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    fad5adc View commit details
    Browse the repository at this point in the history
  6. infamy: Add new class to test multicast

    Depends on having mtools v3+ on test PC, so add it to the docker.
    mattiaswal authored and troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    bd5820e View commit details
    Browse the repository at this point in the history
  7. test: Add a new topoligy to test IGMP

    With 3 data connections between host and DUT.
    mattiaswal authored and troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    3de9abc View commit details
    Browse the repository at this point in the history
  8. test: add new test igmp_basic

    Simple test that tests (without VLAN):
    * Multicast flooding works
    * Join works as expected
    mattiaswal authored and troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    617e06e View commit details
    Browse the repository at this point in the history
  9. confd: disable IPv4LL & IPv6LL on bridge port interfaces

    A bridge port cannot communicate on layer-3 while acting as a bridge
    port.  Removing the port from the bridge re-enables the link-local
    addresses, if any, from the configuration.
    
    Fix #327
    
    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    a8a5341 View commit details
    Browse the repository at this point in the history
  10. test: allow test container to run tcpdump (cap-net-raw)

    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    45cf453 View commit details
    Browse the repository at this point in the history
  11. patches/linux: forward port bridge flood unknown multicast

    This is a forward-port of one of my bridge patches to handle RFC4541
    style flooding of unknown multicast.
    
    https://lore.kernel.org/netdev/20220411133837.318876-9-troglobit@gmail.com/
    
    Changes since this thread: use inferred mctx (VLAN multicast context)
    from br_handle_frame_finish() and br_dev_xmit(), which should fix the
    per-VLAN multicast handling issue pointed out by Nikolay.
    
    Todo before next patch series, add new option instead of breaking the
    existing functionality for the current mcast_flood flag.  E.g., add a
    mcast_flood_always, since the current flag stops flooding when there is
    a known querier on the LAN.
    
    See the above thread for details.
    
    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    26363c0 View commit details
    Browse the repository at this point in the history
  12. patches/linux: ignore router ports when forwarding MAC multicast

    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    e21b92d View commit details
    Browse the repository at this point in the history
  13. patches/iproute2: add support for bridge mcast_flood_always

    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    47999d3 View commit details
    Browse the repository at this point in the history
  14. confd: always flood unknown IP/MAC multicast according to mcast_flood

    An RFC conforming multicast snooping bridge should forward all unknown
    multicast (IP & MAC) on ports where the mcast_flood flag is set.  The
    upstream kernel does not (yet) support this, but the KernelKit branch
    of the kernel and iproute2 now support it.
    
    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    9114b38 View commit details
    Browse the repository at this point in the history
  15. test: igmp_basic: speed up test, remove unnecessary long timeout

    And cleanup ASCII picture
    mattiaswal authored and troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    612ae2c View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    c658331 View commit details
    Browse the repository at this point in the history
  17. package/querierd: add per-interface service template

    Since Infix supports per-VLAN querier parameters, like query interval,
    we currently need to run a separate querierd per VLAN interface.  The
    replacement, mcd, will handle this automatically in its .conf file.
    
    Also, ensure we install the daemon configuration file as an example, and
    thus creating the /etc/querierd/ directory for where .conf files for
    each interface will be generated.
    
    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    a28f0ea View commit details
    Browse the repository at this point in the history
  18. confd: detect bridge per-VLAN interfaces and start querierd

    In a VLAN filtering bridge setup we want to be able to support an
    external IGMP/MLD querier running from userspace, because the bridge
    multicast code can only generate proxy/NULL querys per VLAN.
    
    This patch is a refactor to allow just that.  If a VLAN on the bridge
    has an upper interface, matching the bridge name and VID, we generate
    a profile for querierd and enable the service.
    
    For all other cases we try to disable any running querierd.  It is up
    to the daemon to figure out if it has a usable IP address to use as
    the query source IP or use 0.0.0.0.
    
    Since the logic for selecting a proper IP address must be handled by
    the daemon in the per-VLAN setup, we revert back to also use it for
    the stand-alone unfiltered bridge case as well.
    
    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    590699f View commit details
    Browse the repository at this point in the history
  19. test: igmp_vlan: Speed up test significantly

    Remove a lot of extra sleeps.
    mattiaswal authored and troglobit committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    cb04338 View commit details
    Browse the repository at this point in the history
  20. test: igmp_basic: Speed up test and some renaming

    Rename to more distinct names for netns and hostports
    mattiaswal committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    ccbcada View commit details
    Browse the repository at this point in the history
  21. patches/iproute: backport bridge mdb replace support

    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit authored and mattiaswal committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    1bfe7be View commit details
    Browse the repository at this point in the history
  22. confd: restrict mdb group to iana-rt-types:ip-multicast-group-address

    Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
    troglobit authored and mattiaswal committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    bcba9d1 View commit details
    Browse the repository at this point in the history