1. 11 8月, 2021 3 次提交
  2. 22 7月, 2021 2 次提交
  3. 20 7月, 2021 12 次提交
  4. 12 7月, 2021 2 次提交
  5. 15 5月, 2021 1 次提交
    • M
      net: bridge: fix build when IPv6 is disabled · 30515832
      Matteo Croce 提交于
      The br_ip6_multicast_add_router() prototype is defined only when
      CONFIG_IPV6 is enabled, but the function is always referenced, so there
      is this build error with CONFIG_IPV6 not defined:
      
      net/bridge/br_multicast.c: In function ‘__br_multicast_enable_port’:
      net/bridge/br_multicast.c:1743:3: error: implicit declaration of function ‘br_ip6_multicast_add_router’; did you mean ‘br_ip4_multicast_add_router’? [-Werror=implicit-function-declaration]
       1743 |   br_ip6_multicast_add_router(br, port);
            |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
            |   br_ip4_multicast_add_router
      net/bridge/br_multicast.c: At top level:
      net/bridge/br_multicast.c:2804:13: warning: conflicting types for ‘br_ip6_multicast_add_router’
       2804 | static void br_ip6_multicast_add_router(struct net_bridge *br,
            |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      net/bridge/br_multicast.c:2804:13: error: static declaration of ‘br_ip6_multicast_add_router’ follows non-static declaration
      net/bridge/br_multicast.c:1743:3: note: previous implicit declaration of ‘br_ip6_multicast_add_router’ was here
       1743 |   br_ip6_multicast_add_router(br, port);
            |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Fix this build error by moving the definition out of the #ifdef.
      
      Fixes: a3c02e76 ("net: bridge: mcast: split multicast router state for IPv4 and IPv6")
      Signed-off-by: NMatteo Croce <mcroce@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30515832
  6. 14 5月, 2021 8 次提交
  7. 28 4月, 2021 1 次提交
    • L
      net: bridge: mcast: fix broken length + header check for MRDv6 Adv. · 99014088
      Linus Lüssing 提交于
      The IPv6 Multicast Router Advertisements parsing has the following two
      issues:
      
      For one thing, ICMPv6 MRD Advertisements are smaller than ICMPv6 MLD
      messages (ICMPv6 MRD Adv.: 8 bytes vs. ICMPv6 MLDv1/2: >= 24 bytes,
      assuming MLDv2 Reports with at least one multicast address entry).
      When ipv6_mc_check_mld_msg() tries to parse an Multicast Router
      Advertisement its MLD length check will fail - and it will wrongly
      return -EINVAL, even if we have a valid MRD Advertisement. With the
      returned -EINVAL the bridge code will assume a broken packet and will
      wrongly discard it, potentially leading to multicast packet loss towards
      multicast routers.
      
      The second issue is the MRD header parsing in
      br_ip6_multicast_mrd_rcv(): It wrongly checks for an ICMPv6 header
      immediately after the IPv6 header (IPv6 next header type). However
      according to RFC4286, section 2 all MRD messages contain a Router Alert
      option (just like MLD). So instead there is an IPv6 Hop-by-Hop option
      for the Router Alert between the IPv6 and ICMPv6 header, again leading
      to the bridge wrongly discarding Multicast Router Advertisements.
      
      To fix these two issues, introduce a new return value -ENODATA to
      ipv6_mc_check_mld() to indicate a valid ICMPv6 packet with a hop-by-hop
      option which is not an MLD but potentially an MRD packet. This also
      simplifies further parsing in the bridge code, as ipv6_mc_check_mld()
      already fully checks the ICMPv6 header and hop-by-hop option.
      
      These issues were found and fixed with the help of the mrdisc tool
      (https://github.com/troglobit/mrdisc).
      
      Fixes: 4b3087c7 ("bridge: Snoop Multicast Router Advertisements")
      Signed-off-by: NLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      99014088
  8. 22 4月, 2021 1 次提交
  9. 15 4月, 2021 1 次提交
  10. 15 2月, 2021 1 次提交
  11. 07 2月, 2021 1 次提交
  12. 28 1月, 2021 1 次提交
  13. 26 1月, 2021 1 次提交
  14. 23 1月, 2021 5 次提交
    • N
      net: bridge: multicast: mark IGMPv3/MLDv2 fast-leave deletes · d5a10222
      Nikolay Aleksandrov 提交于
      Mark groups which were deleted due to fast leave/EHT.
      Signed-off-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      d5a10222
    • N
      net: bridge: multicast: handle block pg delete for all cases · e87e4b5c
      Nikolay Aleksandrov 提交于
      A block report can result in empty source and host sets for both include
      and exclude groups so if there are no hosts left we can safely remove
      the group. Pull the block group handling so it can cover both cases and
      add a check if EHT requires the delete.
      Signed-off-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      e87e4b5c
    • N
      net: bridge: multicast: add EHT include and exclude handling · ddc255d9
      Nikolay Aleksandrov 提交于
      Add support for IGMPv3/MLDv2 include and exclude EHT handling. Similar to
      how the reports are processed we have 2 cases when the group is in include
      or exclude mode, these are processed as follows:
       - group include
        - is_include: create missing entries
        - to_include: flush existing entries and create a new set from the
          report, obviously if the src set is empty then we delete the group
      
       - group exclude
        - is_exclude: create missing entries
        - to_exclude: flush existing entries and create a new set from the
          report, any empty source set entries are removed
      
      If the group is in a different mode then we just flush all entries reported
      by the host and we create a new set with the new mode entries created from
      the report. If the report is include type, the source list is empty and
      the group has empty sources' set then we remove it. Any source set entries
      which are empty are removed as well. If the group is in exclude mode it
      can exist without any S,G entries (allowing for all traffic to pass).
      Signed-off-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      ddc255d9
    • N
      net: bridge: multicast: add EHT allow/block handling · 474ddb37
      Nikolay Aleksandrov 提交于
      Add support for IGMPv3/MLDv2 allow/block EHT handling. Similar to how
      the reports are processed we have 2 cases when the group is in include
      or exclude mode, these are processed as follows:
       - group include
        - allow: create missing entries
        - block: remove existing matching entries and remove the corresponding
          S,G entries if there are no more set host entries, then possibly
          delete the whole group if there are no more S,G entries
      
       - group exclude
        - allow
          - host include: create missing entries
          - host exclude: remove existing matching entries and remove the
            corresponding S,G entries if there are no more set host entries
        - block
          - host include: remove existing matching entries and remove the
            corresponding S,G entries if there are no more set host entries,
            then possibly delete the whole group if there are no more S,G entries
          - host exclude: create missing entries
      Signed-off-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      474ddb37
    • N
      net: bridge: multicast: add EHT source set handling functions · baa74d39
      Nikolay Aleksandrov 提交于
      Add EHT source set and set-entry create, delete and lookup functions.
      These allow to manipulate source sets which contain their own host sets
      with entries which joined that S,G. We're limiting the maximum number of
      tracked S,G entries per host to PG_SRC_ENT_LIMIT (currently 32) which is
      the current maximum of S,G entries for a group. There's a per-set timer
      which will be used to destroy the whole set later.
      Signed-off-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      baa74d39