bridge: add groupFwdMask support for multicast forwarding#1254
Open
VaishnavSreekumar wants to merge 13 commits intocontainernetworking:mainfrom
Open
bridge: add groupFwdMask support for multicast forwarding#1254VaishnavSreekumar wants to merge 13 commits intocontainernetworking:mainfrom
VaishnavSreekumar wants to merge 13 commits intocontainernetworking:mainfrom
Conversation
Add two configuration options:
1. "gateways" ([]string): Static gateway IPs that override prevResult.
Supports dual-stack (one IPv4 and/or one IPv6 address).
2. "addSourceHints" (bool): Preserves subnet routes in the main table
with source IP hints, enabling destination-based routing to work
alongside source-based routing
Example:
{
"type": "sbr",
"gateways": ["10.0.0.1"],
"addSourceHints": true
}
Signed-off-by: David Whyte-Gray <40244437+dagrayvid@users.noreply.github.com>
Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
- Use 0.0.0.0/0 or ::/0 as source address when MasqAll is true for full traffic match Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com> Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
036ec78 to
31ec61e
Compare
Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
082334f to
54bd859
Compare
…ation Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
Apply group_fwd_mask only during bridge creation to avoid mutating bridge forwarding behavior during container lifecycle. This ensures compatibility with IPAM CHECK and existing bridge semantics. Also validate existing bridge configuration to prevent silent mismatch. Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
4c2edac to
60d7de2
Compare
Apply group_fwd_mask after bridge ports are attached to avoid interfering with bridge datapath during setup. Ensure idempotent behavior by setting only when default value is present and validating existing configuration to prevent mismatches. Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
60d7de2 to
b34df7a
Compare
Validate group_fwd_mask configuration without applying it at runtime, to avoid interfering with bridge forwarding behavior and existing tests. Signed-off-by: Vaishnav Sreekumar <vaishnavsreekumar301@gmail.com>
c8535cd to
0497dfd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds support for configuring the groupFwdMask attribute in the bridge CNI plugin.
The Linux bridge supports controlling forwarding of link-local multicast traffic via:
/sys/class/net/<bridge>/bridge/group_fwd_maskHowever, this functionality is currently not exposed through the CNI bridge plugin. This PR introduces an optional configuration field to enable this behavior.
Why this is needed
By default, Linux bridges drop certain link-local multicast frames (e.g., LLDP, PTP, LACP).
This becomes a limitation in environments that require precise multicast forwarding, such as:
This change enables users to explicitly configure forwarding behavior when needed.
Changes
Writes mask to:
/sys/class/net/<bridge>/bridge/group_fwd_maskSecurity
Behavior
Example Configuration
Testing
Verified:
Backward Compatibility
Related